Javascript npm:呃!可以在中找到此运行的完整日志

Javascript npm:呃!可以在中找到此运行的完整日志,javascript,vue.js,npm,Javascript,Vue.js,Npm,我尝试安装vue cli,但遇到了很多奇怪的错误。我搜索了错误,但找不到: linux@admin:~/Masaüstü/learn vue$sudo npm安装vue-g linux的[sudo]密码: npm WARN注册表的意外警告https://registry.npmjs.org/: 再次发出杂项警告EAI_:请求https://registry.npmjs.org/vue 失败,原因:getaddrinfo EAI_registry.npmjs.org registry.npmjs.

我尝试安装vue cli,但遇到了很多奇怪的错误。我搜索了错误,但找不到:

linux@admin:~/Masaüstü/learn vue$sudo npm安装vue-g
linux的[sudo]密码:
npm WARN注册表的意外警告https://registry.npmjs.org/: 再次发出杂项警告EAI_:请求https://registry.npmjs.org/vue 失败,原因:getaddrinfo EAI_registry.npmjs.org registry.npmjs.org:443
npm使用来自的过时数据警告注册表https://registry.npmjs.org/ 由于重新验证期间的请求错误。
+ vue@2.6.12
在10.676s中更新了1个软件包
linux@admin:~/Masaüstü/learn vue$vue--版本
“vue”komutu sistemde Bulumanadı。阿马努纳·库鲁拉比利尔:
sudo snap安装vue
linux@admin:~/Masaüstü/learn vue$npm i-g@vue/cli
npm错误!尝试获取时响应超时https://registry.npmjs.org/@vue%2fcli ui加载项网页包(超过30000ms)
npm错误!此运行的完整日志可在以下位置找到:
npm错误/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错误!再次编码EAI_
npm错误!再也没有了
npm错误!请求https://registry.npmjs.org/vue-cli 失败,原因:getaddrinfo EAI_registry.npmjs.org registry.npmjs.org:443
npm错误!此运行的完整日志可在以下位置找到:
npm错误/home/linux/.npm/_logs/2020-09-24T17_40_02_518Z-debug.log
linux@admin:~/Masaüstü/learn vue$npm缓存清理
npm错误!截至npm@5,npm缓存会自动修复损坏问题,并保证从缓存中提取的数据有效。如果要确保所有内容一致,请改用“npm缓存验证”。另一方面,如果您正在调试安装程序的问题,则可以使用“npm install--cache/tmp/empty cache”来使用临时缓存,而不是使用实际的缓存。
npm错误!
npm错误!如果确定要删除整个缓存,请使用--force重新运行此命令。
npm错误!此运行的完整日志可在以下位置找到:
npm错误/home/linux/.npm/_logs/2020-09-24T17_40_33_560Z-debug.log
linux@admin:~/Masaüstü/learn vue$sudo npm缓存清理
npm错误!截至npm@5,npm缓存会自动修复损坏问题,并保证从缓存中提取的数据有效。如果要确保所有内容一致,请改用“npm缓存验证”。另一方面,如果您正在调试安装程序的问题,则可以使用“npm install--cache/tmp/empty cache”来使用临时缓存,而不是使用实际的缓存。
npm错误!
npm错误!如果确定要删除整个缓存,请使用--force重新运行此命令。
npm错误!此运行的完整日志可在以下位置找到:
npm错误/root/.npm/_logs/2020-09-24T17_40_40_872Z-debug.log
linux@admin:~/Masaüstü/learn vue$sudo npm缓存清理--强制
npm警告使用武力我当然希望你知道你在做什么。
linux@admin:~/Masaüstü/learn vue$
我在互联网上搜索了所有内容,在许多论坛上提出了问题,但不幸的是,我找不到答案。最后,我在这里打开话题,希望找到答案。 伙计们,请帮帮我。谢谢

Vue为他们的cli命名(来自v3)。使用
npm i-g@vue/cli

编辑:在此处查看更多信息:

linux@admin:~/Masaüstü/learn-vue$ sudo npm i -g @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @vue/compiler-sfc@3.0.0 requires a peer of vue@3.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/linux/.npm/_logs/2020-09-24T18_13_12_868Z-debug.log
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$ 

错误原因:getaddrinfo EAI_registry.npmjs.org registry.npmjs.org:443通常与网络相关(DNS、防火墙策略等)。请尝试使用
sudo
oh guy谢谢。我尝试使用sudo运行您的命令并完成此工作。谢谢。