node.js : request to https://registry.npmjs.org/vue failed, reason: connect ETIMEDOUT

 

https://v2.vuejs.org/v2/guide/installation.html
https://v3.router.vuejs.org/installation.html
https://v3.cli.vuejs.org/
https://v3.vuex.vuejs.org/installation.html

npm install vuex --save
npm install -g @vue/cli
npm install vue-router
npm install vue

npm install vue -g
npm install vue-router -g
npm install vue-cli -g


C:\Users\geovindu\.npmrc

npm i core-js@3.6.5 --save

request to https://registry.npmjs.org/vue failed, reason: connect ETIMEDOUT 104.16.19.35:443
解决办法是重新安装,从根部解决

1、执行:

npm config get proxy
npm config get https-proxy

如果返回值不为null,继续执行:

注意:要确保两个返回值都是null才可以,否则就要执行下面的代码

npm config set proxy null
npm config set https-proxy null

2、执行:

npm config set registry http://registry.cnpmjs.org/

3、重新安装

npm install -g cnpm --registry=https://registry.npm.taobao.org

指定淘宝镜像

npm config set registry http://registry.npm.taobao.org/


npm install -g cordova ionic
npm install d3 --save-dev

 

 

 

 

 

 

 

 

 

 

posted @ 2022-12-08 00:36  ®Geovin Du Dream Park™  阅读(4085)  评论(0)    收藏  举报