輸入 npm install 報錯

2021-09-27 09:10:08 字數 977 閱讀 5621

錯誤資訊如下

npm warn deprecated [email protected]: browserslist 2 could fail on reading browserslist >3.0 config used in other tools.

npm err! unexpected end of json input while parsing near '...},"0.1.8":{"name":"xm'

導致原因:存在快取。

解決方法:

輸入命令【npm cache clean --force】

參考:

如果還有問題,進行如下步驟:

公升級ionic4時,

1、輸入命令【sudo npm install npm@latest -g】,更新npm為最新版。

2、輸入命令【sudo npm cache clean -f】,清楚npm的快取。

3、輸入命令【sudo npm install -g n】,安裝node

4、輸入命令【sudo n stable】,穩定版本。

公升級ionic5時,

1、輸入命令【npm uninstall -g ionic】,解除安裝ionic。

2、輸入命令【npm install -g @ionic/cli】,安裝ionic。

安裝失敗時,

輸入命令【npm cache verify】

輸入命令【sudo npm i -g cordova-res --unsafe-perm】

npm install 報錯 python相關

設定啟動python的安裝位置,電腦多個python時適用 npm config set python c users administrator.windows build tools python27 python.exe node sass npm rebuild node sass 重構一下...

npm install 報錯解決方法

我相信很多人在執行npm install的時候都遇到各種各樣的問題,比如以下錯誤 error cb never called error this is an error with npm itself.please report this error at error 解決方法如下 一 首先要以管...

npm install 安裝報錯解決辦法

解決 安裝 chromedriver 即可 npm install chromedriver chromedriver cdnurl 刪除npmrc檔案 注意 不是nodejs安裝目錄npm模組下的那個npmrc檔案,而是在c users 下的.npmrc檔案 直接用命令清理 控制台輸入 npm c...