試:
npx create-react-app react
得到:
需要安裝以下軟體包:
創建反應應用程式
確定繼續?(y) 是
您正在運行
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/
以下說明嘗試:
npm uninstall -g create-react-app
并得到
最新,在 217 毫秒內審核了 1 個包
發現 0 個漏洞
然后我嘗試再次運行第一個命令,但它永遠不起作用。
當我跑
npm ls -g --depth 0
我得到
/usr/本地/lib
我提前感謝任何幫助!!
uj5u.com熱心網友回復:
嘗試以下方法之一
npx create-react-app@latest my-react-app
#or
npm create react-app@latest my-react-app
uj5u.com熱心網友回復:
使用 React 的新檔案
第 1 步:運行 npm uninstall -g create-react-app
第 2 步:運行 npm install -g create-react-app
第 3 步:運行 npx create-react-app app-name
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/386253.html
