我一直在嘗試為我的專案安裝一個新的應用程式。我在我的 vs 代碼上運行它時遇到問題。現在,我試圖從全域卸載,但它仍然輸出相同的錯誤。最近有人遇到過這個錯誤嗎?
終端中的 ERROR 輸出:“您正在運行create-react-app4.0.3,它落后于最新版本 (5.0.0)。
我們不再支持全域安裝 Create React App。
請使用以下命令之一洗掉任何全域安裝:
- npm uninstall -g create-react-app
- 紗線全域洗掉 create-react-app
可以在此處找到有關創建新應用程式的最新說明:https : //create-react-app.dev/docs/getting-started/"
提前謝謝。
uj5u.com熱心網友回復:
npx create-react-app@latest my-app
uj5u.com熱心網友回復:
謝謝你們的幫助。我找到了解決方案。我輸入了以下鏈接:https : //create-react-app.dev/docs/getting-started/
然后在里面找到了指導我的鏈接:https : //gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f
這是解決方案:
如果您使用 npm 5.1 或更早版本,則不能使用 npx。相反,全域安裝 create-react-app:
npm install -g create-react-app 現在你可以運行:
創建反應應用程式我的應用程式
再次感謝您的貢獻!
uj5u.com熱心網友回復:
您可以運行此命令來創建版本為 5.0.0 的新應用程式
npx create-react-app@5.0.0 my-app
或者
運行此命令并清除 npx 快取
npx clear-npx-cache
然后運行此命令來創建反應應用程式
npx create-react-app my-app
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/391731.html
標籤:javascript 反应 调试 运行时错误 创建反应应用程序
