npm 安装报错:Cannot read property ‘pickAlgorithm‘ of null

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

问题

npm 安装报错Cannot read property ‘pickAlgorithm‘ of null

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\XXX\AppData\Local\npm-cache\_logs\2022-06-22T09_17_21_151Z-debug-0.log

解决

1.首先windows+R,输入cmd 进入命令窗口 输入npm install查看报错信息很明显版本不匹配

npm WARN npm npm does not support Node.js v14.14.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! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pc\AppData\Roaming\npm-cache_logs\2020-10-23T08_30_48_208
Z-debug.log
 

2.命令窗口执行npm install npm -g然后输入node -vnpm -v查看node和npm的版本

3.以往的版本 | Node.js进入查看node和npm匹配版本分别是多少

4.然后根据自己的node版本来更新npm 版本降低或提高版本
npm -g install npm@6.13.4

5.如果还是显示npm 不支持这个版本需要到C:\Users\pc\AppData\Roaming 根目录下
删除npm npm-cache两 个文件

然后执行 npm -g install npm@6.13.4

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: go