在使用webpack安装bootstarp中遇到的错误

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://regiistry.npm.taobao.org/bootstrap failed, reason: getaddrinfo ENOTFOUND regiistry.npm.taobao.org
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'

可以看到,这个命令请求的是taobao的镜像网站,我一开始以为出错的原因可能是在taobao的镜像网站中没有bootstrap,然后把registry换回原来的网站https://registry.npmjs.org
可是还是会报错。
然后,我试了两条命令

 npm config get proxy
 npm config get https-proxy

返回的值都为null
然后再npm i bootstrap
就可以安装了。
疑惑。

posted @ 2020-02-07 14:21  程序员徐小白  阅读(113)  评论(0)    收藏  举报