“npm WARN npm npm does not support Node.js v10.15.2″版本过低问题升级方法

作者: jekkay 分类: 前端 发布时间: 2020-04-15 15:01

“npm WARN npm npm does not support Node.js v10.15.2″版本过低问题升级方法


问题

今天,在Ubuntu 19.10通过apt安装的npm,发现npm的版本为5.x,在执行npm i 的时候提示版本过低,导致安装依赖库时报错

# http://www.easysb.cn/2020/04/594.html

jekkay@ubuntu-vm:~/code/mastiff/nhids2-front$ npm i
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN notice [SECURITY] node-sass has the following vulnerability: 1 low. Go here for more details: https://www.npmjs.com/advisories?search=node-sass&version=4.13.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN tar write after end
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jekkay/.npm/_logs/2020-04-15T06_48_35_792Z-debug.log

npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

解决方案

升级npm版本即可,具体可以参考以下链接

  • https://www.npmjs.com/package/npm

Linux环境直接以root权限执行以下命令即可:

# 
# http://www.easysb.cn/2020/04/594.html
# 执行一下命令即可

curl -L https://www.npmjs.com/install.sh | sh

而Windows环境可以直接去官网下载安装包:

  • https://nodejs.org/en/download/
文章来源于:http://www.easysb.cn/2020/04/594.html

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据