npm root -g
npm ls –g
npm config ls
npm config ls –l
npm list -g --depth 0
npm outdated -g --depth=0
npm config set prefix "D:\Program Files\npm_global"
npm config set cache "D:\Program Files\npm-cache"
注意:如果更改了全局模块安装路径,也要在系统变量上添加该路径,全局的命令才会生效
更改环境变量。属性——高级系统设置——环境变量
npm config get prefix
持续更新中......
原文:https://www.cnblogs.com/lhongsen/p/14515122.html