【问题标题】:I cannot run npm install我无法运行 npm install
【发布时间】:2022-02-14 07:00:09
【问题描述】:

我的笔记本电脑上有双启动(ubuntu/Windows 10)。 我收到此错误,无法在 Ubuntu 上运行 npm install。我检查了 node -v 它显示 v17.4.0 :

npm does not support Node.js v13.14.0

npm ERR! Invalid or unexpected token

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/diana/.npm/_logs/2022-02-12T09_42_18_704Z-debug-0.log

更新:我必须卸载并删除所有与 node 和 npm 相关的文件夹。我还安装了最新版本的 nvm 0.39,然后我才设法将节点实际升级到正确的版本。现在一切正常。

How can I completely uninstall nodejs, npm and node in Ubuntu

【问题讨论】:

    标签: node.js linux ubuntu


    【解决方案1】:

    【讨论】:

    • 我试过了,它说:``` npm 不支持 Node.js v13.14.0 您可能应该升级到更新版本的节点,因为我们无法保证 npm 可以使用这个版本。你可以在nodejs.org ``找到最新版本,当我运行 node -v 时它显示 v17.4.0
    • 这应该可以工作:sudo apt-get install -y npm
    猜你喜欢
    • 1970-01-01
    • 2018-04-12
    • 2017-09-14
    • 2017-02-14
    • 2019-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-22
    相关资源
    最近更新 更多