我试图使用安装 vue-cli
npm install -g @vue/cli
我收到以下错误
Unhandled rejection Error: EACCES: permission denied, mkdir '/home/moeketsi/.npm/_cacache/tmp'
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/moeketsi/.npm/_logs/2019-08-02T07_16_39_683Z-debug.log
日志文件是可以在这里找到 https://gist.github.com/miraselimo/477220bdbffc2150a76a514585c1cc2a.
当我尝试运行命令时sudo
I get
sudo: npm: command not found
我使用的是 Node v10.16.1 , npm vesrsion 是 6.9.0 。我从他们安装了node.jswebsite https://nodejs.org/en/。我尝试了以下建议post https://stackoverflow.com/questions/52467848/npm-err-cb-never-called-error-when-trying-to-run-npm-install-command或许从一个情况略有不同 https://stackoverflow.com/questions/15393821/npm-err-cb-never-called,所有建议都没有帮助。
根据文档 https://cli.vuejs.org/guide/installation.html如果您安装了以前的版本,则可能会遇到问题。您可以检查安装的所有软件包npm list -g
.
要卸载以前版本的 vue-cli 使用npm uninstall vue-cli -g
如果不是这种情况,您可以尝试运行npm cache clear --force
并尝试再次安装。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)