在運行npm install時報如下錯誤:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lenno/.npm/_logs/2019-04-04T08_14_08_150Z-debug.log
頓時方了,網上一頓猛搜,終于找到解決方案,跟我一步步修復該問題。
- 以管理員模式打開cmd清除你的npm緩存 (mac電腦在npm前加sudo):
npm cache clean -f
- 清除完緩存后,安裝最新版本的Node helper:
npm install -g n
- 然后安裝npm包管理助手
npm install -g n --force
- 用n助手安裝最新的穩(wěn)定版的node
n stable
自此我們已經修復完畢,運行npm install,盡情的揮灑你的靈感吧。