npm更新检查失败 [英] npm update check failed
问题描述
昨晚,我尝试更新节点和npm,它似乎已经成功,但是从那时起,每次尝试运行任何npm命令时,我都会遇到相同的错误.
Last night I tried to update my node and npm, it seemed to have been successful, however ever since then I have been getting this same error any time I try and run any npm command.
我尝试卸载并重新安装npm,但是无法通过下面的错误消息.
I have tried uninstalling and re-installing npm, but cannot get past this error message below.
节点版本:v8.3.0
Node version: v8.3.0
我收到的错误消息:
┌───────────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /Users/veritystothard/.config │
└───────────────────────────────────────────────────────────────────┘
module.js:491
throw err;
^
Error: Cannot find module 'proto-list'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/config-chain/index.js:1:79)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
我不确定在此包含哪些其他详细信息,如果有人在我感谢您的帮助之前遇到了此问题.谢谢!
I'm not sure what other details to include here, if anyone has had this issue before I'd appreciate your help. Thanks!
推荐答案
以下是 github上的答案
修复Windows,我收到此消息:
Fix for windows, I got this message :
npm更新检查失败尝试使用sudo运行或获取对 通过sudo chown -R $ USER:$(id -gn $ USER)进行本地更新配置存储 C:\ Users.config
npm update check failed Try running with sudo or get access to the local update config store via sudo chown -R $USER:$(id -gn $USER) C:\Users.config
所以我继续C:\ Users.config并删除了 "configstore"文件夹.一旦完成此操作,下一次运行npm时, 文件夹已重新生成,并且错误已停止
so I went on to C:\Users.config and deleted the "configstore" folder. once I done this, next time a ran npm start, the folder was re-generated, and error stopped
这篇关于npm更新检查失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!