What is the --save option for npm install?

Answer

As of npm 5.0.0, installed modules are added as a dependency by default, so the --save option is no longer needed. The other save options still exist and are listed in the documentation for npm install.

Original Answer:-


To add package in dependencies:

npm install my_dep --save
or

npm install my_dep -S
or

npm i my_dep -S

To add package in devDependencies

npm install my_test_framework --save-dev
or

npm install my_test_framework -D
or

npm i my_test_framework -D

 

All npm Questions

Ask your interview questions on npm

Write Your comment or Questions if you want the answers on npm from npm Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---