深度阅读

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

作者
作者
2023年08月22日
更新时间
6.61 分钟
阅读时间
0
阅读量

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.

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。