如果是公司内网,存在代理,很多限制。那该如何配置呢
两种方法,一种在命令行中修改,一种直接修改配置文件
方法一
npm config set proxy http://公司的网站:端口号
npm config set https-proxy https://公司的网站:端口号
npm configset strict-ssl false
npm config edit
方法二
打开C:\Users\电脑登录名,修改属性,显示隐藏文件, 找到.npmrc这个文件,修改为
proxy=http://10.248.60.204:3266
https_proxy=https://10.248.60.204:3266
registry=https://registry.npm.taobao.org//安装淘宝镜像
然后保存。