2017-08-12 226 views
0

昨天晚上我试图更新我的节点和npm,它似乎已经成功,但是自那时以来,我一直在尝试运行任何npm命令时都遇到同样的错误。npm更新检查失败

我已经尝试卸载并重新安装npm,但无法通过下面的错误消息。

节点版本: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) 

我不知道在这里包括哪些其他细节,如果任何人有这个问题之前,我会很感激你的帮助。谢谢!

+0

可能重复[Node.js 0.8.15 npm错误:找不到模块'proto-list'](https://stackoverflow.com/questions/13584852/node-js-0-8-15-npm-错误无法找到的模块,原名单) – mscheker

回答

0

以下是github

Fix for windows, I got this message :

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

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

0

更新,所以我刚刚删除目录的.config和本帮助的答案我有类似的错误节点之后。