默认 · 1月 22, 2023 0

How to use the -S option when using npm to install packages

内容纲要

Some people use the — save option when installing packages with npm.What does the — save option do?

npm install packagename --save

Npm is a package manager for node.

When you download a package using the npm command, it installs the packages in the node_modules folder and adds the installed module as a dependency in your package.json file.

Npm installed the packages in node _modules before the 5.0.0, but didn’t make them a dependency by default.

If you wanted to save the module as a dependency in the package.json file, you had to do it using the — save or -S option .

As of version 5.0.0, you no longer need to use this option.

%d 博主赞过: