标题: npm error network ‘proxy‘ config is set properly. See: ‘npm help co [打印本页] 作者: 天空闲话 时间: 2024-8-23 10:30 标题: npm error network ‘proxy‘ config is set properly. See: ‘npm help co 利用" npm install " 大概 " npm i " 初始化项目依赖失败
npm error network 'proxy' config is set properly. See: 'npm help config'
复制代码
出现这样的办理方法如下:
1.检察代理
//代理
npm config get proxy
//缓存
npm config get npm config get https-proxy
//镜像源
npm config get registry
复制代码
2.将代理制空和缓存制空
方法一:
//代理制空
npm config set proxy false
//缓存制空
npm cache clean --force
复制代码
方法二:
//代理制空
npm config set proxy null
//缓存制空
npm config set https-proxy null
复制代码
3.配置新的镜像源
注意:国内推荐淘宝源,比较快
淘宝源
npm config set registry http://registry.npm.taobao.org/
官方源
npm config set registry http://registry.npmjs.org/
npm config set registry https://registry.npmjs.org/