新手在这里,我试图安装vue cli与npm的前端开发,但它抛出一个错误。
这是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,node版本15.4.0。我试过了:
- 重新尝试查看这次是否有效
sudo npm cache verify
和sudo npm cache clean --force
- 移除
/usr/lib/node_modules
- 重新安装node和npm
- 我在网上找到的其他东西
我被这个错误卡住了几天,任何帮助都是感激的。
有趣的是,它没有-g标志,安装到当前文件夹,但我不知道如何使用vue
命令。
好的,我删除了Manjaro,并抓取了最新版本的ubuntu,这解决了我的问题,再也不会安装Manjaro了。