node.js - npm 不支持 Node.js v16.10.0

标签 node.js npm

当我在终端上运行“npm install npm@latest -g”脚本时

它显示这样的错误

PS C:\xampp\htdocs\laravelecommerce3> npm install npm@latest -g
npm WARN npm npm does not support Node.js v16.10.0
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 6, 8, 9, 10, 11, 12.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dell\AppData\Roaming\npm-cache\_logs\2021-09-24T19_58_30_197Z-debug.log

我的 Node 版本是

v16.10.0

我的 npm 版本是

6.9.2

请多多指教和帮助

最佳答案

您需要安装 npm 7.0.0 或更高版本才能运行 node v16。 https://nodejs.org/en/download/releases/ enter image description here

您可以引用以下链接。这里已经回答了windows系统。 How can I update npm on Windows?

关于node.js - npm 不支持 Node.js v16.10.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69320619/

相关文章:

angular - 为什么 Angular 包是分开的,为什么我们需要它们

javascript - 接收无法找到模块错误,如何修复?

npm - 为什么 'npm doctor'会产生权限错误?

github - 从 github npm 注册表安装包 - 身份验证错误 401

node.js - 在 Mongoose 中添加复杂的数据结构

json - CouchDB 批量文档 api 上的 UTF-8 JSON 无效

node.js - 如何将下载的 npm 依赖项发布到私有(private)本地存储库?

node.js - 如何使用 graphicsmagick 在 nodejs 中流式传输响应

javascript - 使用回调 hell 将构建转换为 promise hell

javascript - Node.js REPL 中的 .clear 元命令