因此,基本上我正在尝试使用vue create vue-first-app设置一个新的Vue项目,并最终得到以下错误。我尝试使用npm install -timeout=9999999增加超时。我也试着用npm cache clean --force清洗npm cashe,但没有帮助。有谁知道解决这个问题的方法吗?
Vue CLI v4.5.9
✨ Creating project in /home/marius/vue/vue-first-app.
Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npm.taobao.org/mkdirp failed, reason: Socket timeout
npm ERR! A complete log of this run can be found in:
npm ERR! /home/marius/.npm/_logs/2020-12-14T09_54_21_447Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps发布于 2021-03-10 20:14:20
试一试
或者
sudo npm cache clean -fnpm updatenpm update -g @vue/clivue create vue-first-app或
将npm注册表url指向http:
npm config set registry="http://registry.npmjs.org/"
然后重新运行vue cli命令:
vue create vue-first-app
发布于 2020-12-14 18:14:52
这可能会对你有帮助。
installationDirectory\nodejs\node_modules\npm并打开.npmrc文件,然后尝试更改超时时间。发布于 2021-01-02 17:57:06
也有同样的问题。
对我来说,使用sudo是可行的。
sudo vue create vue-first-app祝好运!
https://stackoverflow.com/questions/65287055
复制相似问题