【发布时间】:2020-09-24 17:56:06
【问题描述】:
我尝试安装 vue cli。但我收到了很多奇怪的错误。我搜索了错误但找不到它们:
linux@admin:~/Masaüstü/learn-vue$ sudo npm install vue -g
[sudo] password for linux:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/vue failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
+ vue@2.6.12
updated 1 package in 10.676s
linux@admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux@admin:~/Masaüstü/learn-vue$ npm i -g @vue/cli
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/@vue%2fcli-ui-addon-webpack (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_37_08_787Z-debug.log
linux@admin:~/Masaüstü/learn-vue$ npm i -g vue-cli@2.9.6
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/vue-cli failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_02_518Z-debug.log
linux@admin:~/Masaüstü/learn-vue$ npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_33_560Z-debug.log
linux@admin:~/Masaüstü/learn-vue$ sudo npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-24T17_40_40_872Z-debug.log
linux@admin:~/Masaüstü/learn-vue$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
linux@admin:~/Masaüstü/learn-vue$
我在互联网上搜索了所有内容,我在许多论坛上提出了问题,但不幸的是我找不到答案。最后,我在这里打开话题希望找到答案。 请大家帮帮我。谢谢
【问题讨论】:
-
错误
reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443通常与网络相关(DNS、防火墙策略等)。
标签: javascript vue.js npm