修復npm ERR! cb()never called!的錯誤

在運行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

頓時方了,網上一頓猛搜,終于找到解決方案,跟我一步步修復該問題。

  1. 以管理員模式打開cmd清除你的npm緩存 (mac電腦在npm前加sudo):
npm cache clean -f
  1. 清除完緩存后,安裝最新版本的Node helper:
 npm install -g n
  1. 然后安裝npm包管理助手
npm install -g n --force
  1. 用n助手安裝最新的穩(wěn)定版的node
n stable

自此我們已經修復完畢,運行npm install,盡情的揮灑你的靈感吧。

?著作權歸作者所有,轉載或內容合作請聯系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容