Performance: Project scaffolding
Project scaffolding affects initial load speed and bundle size by determining the structure and included modules of the NestJS app.
nest new my-app --skip-install // Remove unused modules and providers before installing dependencies // Use minimal modules and lazy load features where possible
nest new my-app // Accept all default modules including unnecessary ones like testing and example modules // Add many unused providers and controllers manually after scaffolding
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Default scaffold with all modules | N/A | N/A | High due to large JS bundle | [X] Bad |
| Minimal scaffold with only needed modules | N/A | N/A | Lower due to smaller JS bundle | [OK] Good |
nest new project-name in NestJS?nest new project-namemy-app?nest new project-name.nest new my-app matches the correct CLI command format.nest new sample-app, which folder structure will you see inside sample-app?src/ folder for source code, node_modules/ for dependencies, and config files like package.json and nest-cli.json.nest new myproject but got an error: Command 'nest' not found. What is the most likely fix?nest command, likely because the Nest CLI is not installed globally.npm i -g @nestjs/cli makes the nest command available anywhere.yarn instead of npm. Which command should you run?--package-manager to specify which package manager to use during project creation.--package-manager yarn. Other options are invalid or incomplete.Pass the test and this pattern moves unknown