如何解决cb() 从未调用过!安装@vue/cli 时
这里的新手,我正在尝试使用 npm 安装 vue cli 进行前端开发,但它抛出了一个错误。
这是sudo npm install -g @vue/cli
的输出
[18:00 vue]$ sudo npm install -g @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
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! /root/.npm/_logs/2021-01-18T13_06_37_662Z-debug.log
我尝试使用和不使用 sudo,同样的错误。
我的机器运行 Manjaro KDE 20.2,npm 版本 6.14.9,节点 v15.4.0。我试过了:
- 重试看看这次是否有效
-
sudo npm cache verify
和sudo npm cache clean --force
- 删除
/usr/lib/node_modules
- 重新安装 node 和 npm
- 我在互联网上找到的任何其他内容
我被这个错误困扰了几天,感谢您的帮助。
有趣的是,它在没有 -g 标志的情况下工作,安装到当前文件夹,但我不知道如何使用 vue
命令。
解决方法
好的,我删除了那个 Manjaro,并获取了最新版本的 ubuntu,这解决了我的问题,再也不会安装 Manjaro。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。