npm ERR! Unexpected end of JSON input while parsing near '...Rg9e9zaVBZ

問題呈現

npm install @babel/preset-env --save-dev
npm ERR! Unexpected end of JSON input while parsing near '...Rg9e9zaVBZmVC6WEx1k\n'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-03-01T04_37_19_578Z-debug.log
PS C:\Users\Administrator\Desktop\webpack4.x> npm install @babel/preset-env --save-dev
npm ERR! Unexpected end of JSON input while parsing near '...Rg9e9zaVBZmVC6WEx1k\n'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-03-01T04_38_01_505Z-debug.log

解決方案

第一步:運行npm cache clean --force
npm cache clean --force
第二步:運行npm install @babel/preset-env --save-dev
npm install @babel/preset-env --save-dev

呈現結果

在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章