简体   繁体   English

“npm i”和“npm install”有什么区别?

[英]What is the difference betweene 'npm i' and 'npm install'?

What is the difference between npm i and npm install commands? npm inpm install命令有什么区别? Both install all node Modules from package.json .两者都从package.json安装所有节点模块。

I know that it means to install.我知道这意味着安装。 It could be possible that there is some difference between i and install . iinstall之间可能存在一些差异。

There is no difference, since "npm i" is an alias for "npm install".没有区别,因为“npm i”是“npm install”的别名。 They both do the exact same thing (install or update all the dependencies in your package-lock.json ).它们都做完全相同的事情(安装或更新package-lock.json 中的所有依赖)。

Docs: https://docs.npmjs.com/cli/install via CRice文档: https : //docs.npmjs.com/cli/install通过CRice

npm install (aliases: npm i, npm add ) (with no args, in package dir)
         npm install [<@scope>/]<name>
         npm install [<@scope>/]<name>@<tag>
         npm install [<@scope>/]<name>@<version>
         npm install [<@scope>/]<name>@<version range>
         npm install <git-host>:<git-user>/<repo-name>
         npm install <git repo url>
         npm install <tarball file>
         npm install <tarball url>
         npm install <folder>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM