(不安装 devDependencies 的依赖)
npm install --production
npm ls -g --depth=0 --link=true
# 下面这个不太管用
ls -l node_modules | grep '>'
npm list -g --depth 0
全局一般安装在:/usr/local/lib/node_modules
如果我们遇到模块安装失败,但是这个失败并不阻塞后续流程,可以通过该方法忽略掉
将要忽略的模块加入 package.json 里的 optionalDependencies 字段
"optionalDependencies": {
"fsevents": "*"
}
感谢:angular/angular-cli#8551 (comment)
npm view <packageName> time
