0
0
Node.jsframework~10 mins

Installing packages (dependencies vs devDependencies) in Node.js - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to install a package as a regular dependency.

Node.js
npm install [1]
Drag options to blanks, or click blank then click option'
Aexpress
B--save-dev express
C--global express
D--save-exact express
Attempts:
3 left
💡 Hint
Common Mistakes
Using --save-dev installs the package as a devDependency instead of a regular dependency.
Adding --global installs the package globally, not locally.
2fill in blank
medium

Complete the code to install a package as a development dependency.

Node.js
npm install [1]
Drag options to blanks, or click blank then click option'
A--save-dev jest
Blodash
C--global jest
D--save-exact jest
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the --save-dev flag installs the package as a regular dependency.
Using --global installs the package globally, which is not what you want here.
3fill in blank
hard

Fix the error in the command to install a devDependency.

Node.js
npm install [1]
Drag options to blanks, or click blank then click option'
A--save-dev
Bjest --save-dev
C--save-dev jest
D--dev jest
Attempts:
3 left
💡 Hint
Common Mistakes
Placing the package name before the flag causes an error.
Using --dev instead of --save-dev is invalid.
4fill in blank
hard

Fill both blanks to add a package as a regular dependency and save exact version.

Node.js
npm install [1] [2]
Drag options to blanks, or click blank then click option'
Aexpress
B--save-exact
C--save-dev
Dlodash
Attempts:
3 left
💡 Hint
Common Mistakes
Using --save-dev installs as a devDependency, not regular dependency.
Putting the flag before the package name can cause confusion.
5fill in blank
hard

Fill all three blanks to install a package as a devDependency with exact version saved.

Node.js
npm install [1] [2] [3]
Drag options to blanks, or click blank then click option'
Ajest
B--save-dev
C--save-exact
Deslint
Attempts:
3 left
💡 Hint
Common Mistakes
Placing flags in the wrong order.
Using the wrong package name or missing flags.