npm 因“ERR!cb() 从未调用过" [英] npm crashes with "ERR! cb() never called"
本文介绍了npm 因“ERR!cb() 从未调用过"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图使用
npm install -g @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
日志文件在此处提供.
当我尝试使用 sudo
运行命令时,我得到
When i try running the command with sudo
I get
sudo: npm: command not found
我正在使用 node v10.16.1 并且 npm 版本是 6.9.0 .我从他们的 网站 安装了 node.js.我从这个 post 和可能来自 稍微不同的情况,没有任何建议有帮助.
I'm using node v10.16.1 and npm vesrsion is 6.9.0 . I installed node.js from their website. I tried the following suggestions from this post and from maybe a slightly different case, none of the suggestions helped.
推荐答案
这是权限问题.转到根目录并尝试安装.
This is the Issue of permission . Go to the root and try to install.
从 root 用户尝试:
Try from root user :
sudo -i
npm install -g @vue/cli
如果你想维护当前目录.
If u want to maintain current directory.
sudo -s
npm install -g @vue/cli
这篇关于npm 因“ERR!cb() 从未调用过"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文