欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

在vs code 中用npm下载webpack出错

程序员文章站 2022-03-16 20:03:29
npm ERR! errno ETIMEDOUTnpm ERR! network request to https://registry.npmjs.org/webpack failed, reason: connect ETIMEDOUT 104.16.22.35:443npm ERR! network This is a problem related to network connectivity.npm ERR! network In most cases you are behind a p...

npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/webpack failed, reason: connect ETIMEDOUT 104.16.22.35:443
npm ERR! network 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 ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\LENOVO\AppData\Roaming\npm-cache_logs\2020-08-11T01_21_19_209Z-debug.log

在vs code 中用npm下载webpack时,总是报以上的错误。
此时先输入
npm install -g npm
然后重新输入
npm i webpack webpack-cli -D

本文地址:https://blog.csdn.net/qq_44791528/article/details/107928309