macOS、linux、ubuntu中,
执行npm命令时,报错:
# npm install socket.io
ERROR: npm is known not to run on Node.js v10.19.0
You'll need to upgrade to a newer Node.js version in order to use this
升级Node.js。
步骤:
wget -qO- https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
【注意】:
Node.js
在macOS、Linux、Ubuntu系统中遇到npm命令执行失败,错误提示为不支持Node.js v10.19.0版本。为了解决此问题,需要升级到Node.js的最新版本,如Node.js v16.x。升级过程包括通过wget下载安装脚本,使用sudo apt-get install进行安装。确保遵循官方提供的版本更新链接以获取最新稳定版。
https://nodejs.org/zh-cn/download/releases/
820

被折叠的 条评论
为什么被折叠?



