I clone a git repo to my local, and run npm install
, it worked. What's the different running npm install vs npm install -g
? Why would I need to run npm install -g
to a repo? unless it's a tool for example nodemon I would like to install globally because I want to use them everywhere.
npm install -g NAME
它会全局安装,但如果要使用它,则应在项目所在的文件夹中使用npm link NAME
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.