嘗試安裝軟體包時,我收到“npm ERR!400 Bad Request - GET https://registry.npmjs.org/create-react-app”

嘗試安裝軟體包時,我收到“npm ERR!400 Bad Request - GET https://registry.npmjs.org/create-react-app”

當嘗試安裝軟體包時,我收到 npm ERR! 400 錯誤請求 - GEThttps://registry.npmjs.org/create-react-app

答案1

我遇到了類似的問題,我透過刪除 .npmrc 中的所有其他行並僅保留以下內容來解決(這在我在本地工作時有效):

registry=https://registry.npmjs.org/

每個使用者的設定檔(.npmrc)位於您的主目錄中:

cd ~/

相關內容