npm安装失败(npm ERR! cb() never called! npm ERR! This is an error with npm itself)

①清理npm缓存

npm cache clean -f

②安装最新版本的Node helper

npm install -g n

③安装npm包管理助手

npm install -g n --force

④安装npm

npm install

注意事项:使用mac的话npm前面加sudo,使用的国内的淘宝镜像的话前面加c。若②安装失败,可直接尝试进行④。

原文地址:https://www.cnblogs.com/chill-yu/p/13966088.html