【发布时间】:2018-09-19 18:12:54
【问题描述】:
我刚刚安装了节点v9.11.1,当我尝试使用 npm 时,我不断收到以下错误:
npm WARN npm npm does not support Node.js v9.11.1
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.
npm WARN npm You can find the latest version at https://nodejs.org/
我尝试执行npm i -g npm,但它无法自行更新,它只是不断抛出与上面相同的错误。
当我运行npm -v 时,它显示5.5.1,目前最新版本似乎是5.8.0。
我尝试删除文件夹并在 node.js 安装程序上运行修复功能,但它没有替换模块。
【问题讨论】:
-
我的 npm 安装也失败了。就我而言,尝试运行任何 npm 命令时出现以下错误:
TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/agent.js:114:44) at Module._compile (node:internal/modules/cjs/loader:1101:14) [...]
标签: node.js npm installation uninstallation reinstall