如何解决以下错误?我使用 Ubuntu 16。 当我运行任何 npm 命令(例如“npm run dev”)时,我会收到此错误:
ERROR: npm is known not to run on Node.js v4.2.6 Node.js 4 is supported but the specific version you're running has a bug known to break npm. Please update to at least ${rel.min} to use this version of npm. You can find the latest release of Node.js at https://nodejs.org/
最佳答案
首先,完全卸载 nodejs 和 npm。
sudo apt remove nodejs npm
然后,通过以下链接重新安装它:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
引用:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
关于node.js - 错误 : npm is known not to run on Node. js V4.2.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46360567/