npm WARN npm npm不支持Node.js v7.2.0,我尝试键入“ npm uninstall -g npm”,但是它不起作用,我该如何解决它,谢谢> << / p>
npm WARN npm npm does not support Node.js v7.2.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.
npm WARN npm You can find the latest version at https://nodejs.org/
andyhuangde-MacBook-Air:~ andyhuang$ npm uninstall -g npm
npm WARN npm npm does not support Node.js v7.2.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.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! path /private/tmp/npm.37658/package/npm-6.4.1.tgz
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall stat
npm ERR! enoent ENOENT: no such file or directory, stat '/private/tmp/npm.37658/package/npm-6.4.1.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
答案 0 :(得分:0)
首先,您需要安装LTS 10.15.3
其次,为什么要使用
卸载npmnpm uninstall -g npm
如果卸载npm,如何安装节点软件包?
答案 1 :(得分:0)
因为您的npm
和Node.js
版本与该版本不匹配。
Node.js 7.2应该使用npm 3.10(您可以在Previous Releases中检查版本)
您应更改npm
或Node.js
以匹配版本。
我的建议是使用: -nvm(对于Mac / Linux) -nvm-windows用于窗口
它将自动下载Node.js和npm匹配版本(实际上不需要它,当您下载安装程序时,它将自动下载npm匹配版本),易于更改以更新Node.js