Complete the code to install a package as a regular dependency.
npm install [1]To install a package as a regular dependency, just use npm install package-name without extra flags.
Complete the code to install a package as a development dependency.
npm install [1]--save-dev flag installs the package as a regular dependency.--global installs the package globally, which is not what you want here.Use --save-dev to add a package only needed during development, like testing tools.
Fix the error in the command to install a devDependency.
npm install [1]--dev instead of --save-dev is invalid.The correct syntax is npm install --save-dev package-name. The flag must come before the package name.
Fill both blanks to add a package as a regular dependency and save exact version.
npm install [1] [2]
--save-dev installs as a devDependency, not regular dependency.Use npm install package-name --save-exact to install a regular dependency and save its exact version.
Fill all three blanks to install a package as a devDependency with exact version saved.
npm install [1] [2] [3]
The correct command is npm install --save-dev jest --save-exact to install jest as a devDependency and save its exact version.