This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
在使用npm install 下载包的时候总是报以下错误:
在控制台或Visual Studio Code终端中运行以下命令:
npm config rm proxy
npm config rm https-proxy
使用以下命令重新注册设置:
npm config set registry https://registry.npmjs.org/
如果您使用代理访问Web,还必须配置以下命令:
npm config set proxy http://username:password@proxyname:8080
npm config set https-proxy http://username:password@proxyname:8080
完成以上几步npm install 就可以正常使用啦