.npmrc配置

-

registry=http://registry.npmjs.org/
# 定义npm的registry,即npm的包下载源

proxy=http://proxy.example.com:8080/
# 定义npm的代理服务器,用于访问网络

https-proxy=http://proxy.example.com:8080/
# 定义npm的https代理服务器,用于访问网络

strict-ssl=true
# 是否在SSL证书验证错误时退出

cafile=/path/to/cafile.pem
# 定义自定义CA证书文件的路径

user-agent=npm/{npm-version} node/{node-version} {platform}
# 自定义请求头中的User-Agent

save=true
# 安装包时是否自动保存到package.json的dependencies中

save-dev=true
# 安装包时是否自动保存到package.json的devDependencies中

save-exact=true
# 安装包时是否精确保存版本号

engine-strict=true
# 是否在安装时检查依赖的node和npm版本是否符合要求

scripts-prepend-node-path=true
# 是否在运行脚本时自动将node的路径添加到PATH环境变量中

 npm config list 会看到这些信息,页呢能看到你全局.npmrc的地址所在

registry=https://registry.npmmirror.com/
disturl=https://nodejs.org/dist
chromedriver-cdnurl=https://registry.npmmirror.com/mirrors/chromedriver
couchbase-binary-host-mirror=https://registry.npmmirror.com/mirrors/couchbase/v{version}
debug-binary-host-mirror=https://registry.npmmirror.com/mirrors/node-inspector
electron-mirror=https://registry.npmmirror.com/mirrors/electron/
flow-bin-binary-host-mirror=https://registry.npmmirror.com/mirrors/flow/v
fse-binary-host-mirror=https://registry.npmmirror.com/mirrors/fsevents
fuse-bindings-binary-host-mirror=https://registry.npmmirror.com/mirrors/fuse-bindings/v{version}
git4win-mirror=https://registry.npmmirror.com/mirrors/git-for-windows
gl-binary-host-mirror=https://registry.npmmirror.com/mirrors/gl/v{version}
grpc-node-binary-host-mirror=https://registry.npmmirror.com/mirrors
hackrf-binary-host-mirror=https://registry.npmmirror.com/mirrors/hackrf/v{version}
leveldown-binary-host-mirror=https://registry.npmmirror.com/mirrors/leveldown/v{version}
leveldown-hyper-binary-host-mirror=https://registry.npmmirror.com/mirrors/leveldown-hyper/v{version}
mknod-binary-host-mirror=https://registry.npmmirror.com/mirrors/mknod/v{version}
node-sqlite3-binary-host-mirror=https://registry.npmmirror.com/mirrors
node-tk5-binary-host-mirror=https://registry.npmmirror.com/mirrors/node-tk5/v{version}
nodegit-binary-host-mirror=https://registry.npmmirror.com/mirrors/nodegit/v{version}/
operadriver-cdnurl=https://registry.npmmirror.com/mirrors/operadriver
phantomjs-cdnurl=https://registry.npmmirror.com/mirrors/phantomjs
profiler-binary-host-mirror=https://registry.npmmirror.com/mirrors/node-inspector/
puppeteer-download-host=https://registry.npmmirror.com/mirrors
python-mirror=https://registry.npmmirror.com/mirrors/python
rabin-binary-host-mirror=https://registry.npmmirror.com/mirrors/rabin/v{version}
sass-binary-site=https://registry.npmmirror.com/mirrors/node-sass
sodium-prebuilt-binary-host-mirror=https://registry.npmmirror.com/mirrors/sodium-prebuilt/v{version}
sqlite3-binary-site=https://registry.npmmirror.com/mirrors/sqlite3
utf-8-validate-binary-host-mirror=https://registry.npmmirror.com/mirrors/utf-8-validate/v{version}
utp-native-binary-host-mirror=https://registry.npmmirror.com/mirrors/utp-native/v{version}
zmq-prebuilt-binary-host-mirror=https://registry.npmmirror.com/mirrors/zmq-prebuilt/v{version}
ELECTRON_MIRROR=https://registry.npmmirror.com/mirrors/electron/
python=E:\conda
home=https://npmmirror.com
strict-ssl=false

 

 

 

-

posted @ 2024-01-22 22:45  古墩古墩  Views(921)  Comments(0Edit  收藏  举报