安装最新的Node版本后无法升级到npm的最新版本

时间:2020-07-10 15:01:11

标签: node.js npm npm-install npm-update npm-version

我的计算机上安装的npm的当前版本为4.6.1

我想升级到最新版本或任何其他版本>= 5.2.0。但是,当尝试这样做时,我得到了这些错误(如下所示)。请给我建议解决方案。

错误:

C:\Users\xxx>node -v
v14.5.0

C:\Users\xxx>npm -v
4.6.1

C:\Users\xxx>npm -g install @latest

npm ERR! addLocal Could not install C:\Users\xxx\@latest
npm ERR! path C:\Users\xxx\@latest
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\xxx\@latest'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and 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:
npm ERR!     C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2020-07-10T15_02_38_917Z-debug.log

C:\Users\xxx>npm upgrade

npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2020-07-10T15_02_45_863Z-debug.log

0 个答案:

没有答案