0
0
NestJSframework~20 mins

NestJS CLI installation - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
NestJS CLI Installation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
Correct command to install NestJS CLI globally
Which command correctly installs the NestJS CLI globally using npm?
Anpm install -g @nestjs/cli
Bnpm install @nestjs/cli -g
Cnpm global install @nestjs/cli
Dnpm install --global nestjs-cli
Attempts:
2 left
💡 Hint
The global flag should come immediately after 'install'.
component_behavior
intermediate
1:30remaining
Behavior after installing NestJS CLI globally
After installing NestJS CLI globally, what happens when you run nest --version in the terminal?
AIt throws an error saying 'command not found'.
BIt creates a new NestJS project in the current folder.
CIt opens the NestJS documentation in the browser.
DIt shows the installed NestJS CLI version number.
Attempts:
2 left
💡 Hint
The --version flag usually shows version info for CLI tools.
🔧 Debug
advanced
2:30remaining
Troubleshooting 'nest' command not found after global install
You installed NestJS CLI globally with npm install -g @nestjs/cli, but running nest gives 'command not found'. What is the most likely cause?
AThe NestJS CLI package is deprecated and no longer works.
BYou need to restart your computer before using new global commands.
CThe global npm bin folder is not in your system PATH environment variable.
DYou must run <code>npm link @nestjs/cli</code> after installation.
Attempts:
2 left
💡 Hint
Global commands require the system to know where to find them.
🧠 Conceptual
advanced
2:00remaining
Understanding local vs global NestJS CLI installation
What is the main difference between installing NestJS CLI globally vs locally in a project?
AGlobal install allows using <code>nest</code> command anywhere; local install restricts usage to that project only.
BLocal install automatically updates the CLI; global install does not.
CGlobal install requires root permissions; local install does not.
DLocal install installs the CLI as a system service; global install does not.
Attempts:
2 left
💡 Hint
Think about where you can run the nest command after each install type.
state_output
expert
3:00remaining
Output of NestJS CLI project creation command
What output do you expect immediately after running nest new my-app in a terminal with NestJS CLI installed globally?
AAn error saying 'Project name missing' is shown.
BA new folder 'my-app' is created with initial NestJS project files and a prompt to choose package manager.
CThe CLI installs global dependencies but does not create any folder.
DThe terminal opens the NestJS website for project templates.
Attempts:
2 left
💡 Hint
The nest new command scaffolds a new project folder.