美文网首页
npm 命令提示npm update check failed

npm 命令提示npm update check failed

作者: 天魂_TH | 来源:发表于2017-09-01 16:14 被阅读3620次

在ITerm2执行npm命令的时候总会在结束的时候出现一个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) /home/{username}/.config

命令倒是正常执行了,但是每次出现这个感觉不舒服,看了一下是因为文件夹权限的问题,.config / configstore文件夹中包含一个文件:update-notifier-npm.json。
就是因为没有configstore文件夹的权限。
所以要解决这个问题就是在iTerm2中执行:

sudo chown -R $USER:$(id -gn $USER) /home/{username}/.config

相关文章

网友评论

      本文标题:npm 命令提示npm update check failed

      本文链接:https://www.haomeiwen.com/subject/wwkkjxtx.html