赞
踩
.npmrc
文件,就是npm
的配置文件所在位置。
npm config edit
执行“npm config edit”时会弹出.npmrc文件,修改后保存即可。
查看.npmrc位置
- C:\Users\test>npm config list
- ; "builtin" config from C:\Program Files\nodejs\node_modules\npm\npmrc
-
- prefix = "C:\\Users\\test\\AppData\\Roaming\\npm"
-
- ; "user" config from C:\Users\test\.npmrc
-
- node_gyp = "C:\\Program Files\\nodejs\\node_global\\node_modules\\node-gyp\\bin\\node-gyp.js"
- python = "C:\\Program_Apps\\Python27\\python.exe"
-
- ; node bin location = C:\Program Files\nodejs\node.exe
- ; cwd = C:\Users\test
- ; HOME = C:\Users\test
- ; Run `npm config ls -l` to show all defaults.
常用配置如下:
- prefix=C:\Users\test\node\nodejs\node_global
- cache=C:\Users\test\node\nodejs\node_cache
- registry=http://registry.npmjs.org
- strict-ssl=false
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。