【发布时间】:2018-10-30 01:24:06
【问题描述】:
每次我打开终端窗口时,我都会得到这个(甚至在输入任何内容之前):
ERROR: npm is known not to run on Node.js v4.1.2
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v4.1.2 --silent` to unset it.
我从未运行过 node 4 的版本,但无论如何我按照我在网上找到的一些非常彻底的步骤完全删除了 node.js,然后将其从网站重新安装到版本 8.11.2(node -v 给了我 v8. 11.2) 但警告仍然出现
直到我的 npm 在尝试使用 create-react 时开始严重出现问题之前,我从来没有过多关注它,通过 npm audit 向我发出大量安全警告,并且不让我更新到指定的模块版本。
我已经尝试了一切,重新安装 npm,重新安装节点等,我担心它现在会干扰我的应用程序。
【问题讨论】:
标签: node.js macos npm terminal nvm