npm install 时控制台报错,原因:代理有问题,解决方法:
1、取消 npm 代理设置,打开 cmd,输入命令:
npm config set proxy null
2、再输入命令:
npm config set https-proxy null
3、添加淘宝镜像,输入命令:
npm --registry https://registry.npm.taobao.org info underscore
4、在 C:\Users\yourname 中搜索 .npmrc 文件,用记事本打开,在 .npmrc 最后一行添加代理:
registry = https://registry.npm.taobao.org/
5、打开 VSCode :
npm install