错误:已知 npm 不能在 Node.js V4.2.6 上运行 [英] Error: npm is known not to run on Node.js V4.2.6
问题描述
我该如何解决以下错误?我使用 Ubuntu 16.当我运行任何 npm 命令(例如npm run dev")时,我收到此错误:
how can I solve the following error? I use Ubuntu 16. When I run any npm command such as "npm run dev" I get this error:
错误:已知 npm 不能在 Node.js v4.2.6 上运行 Node.js 4 是支持,但您正在运行的特定版本有一个已知的错误打破 npm.请至少更新到 ${rel.min} 以使用此版本的下午.您可以在 https://nodejs.org/
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.
First, Uninstall completely nodejs and npm.
sudo apt remove nodejs npm
然后,通过以下链接重新安装:
Then, reinstall it over the link below:
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
这篇关于错误:已知 npm 不能在 Node.js V4.2.6 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!