簡體   English   中英

在npm上啟動啟動應用程序時出錯

[英]Getting error on npm start create-react-app

我目前正在學習React。 我已經做好了:

  • npm i -g create-react-app (成功)
  • create-react-app react-app (成功)
  • cd react-app
  • npm start (上面的錯誤)

輸出:

  • 此時,npm start \\ Git \\ cmd是意外的。

  • npm ERR! 代碼ELIFECYCLE

因此,我嘗試通過在線搜索進行嘗試:

  • npm cache clean --force
  • 刪除node_modules
  • 刪除package-lock.json
  • npm run clear
  • npm安裝

沒有解決。 我讀過我不應該在全球范圍內安裝,但是現在已經安裝了(?),可以回滾嗎? 我無法再次運行npm ig create-react-app。 謝謝

編輯:添加了截圖https://i.ibb.co/mNKLskX/Capturar.png

使用npm試試init

npm init react-app my-app

或者,嘗試npx

npx create-react-app my-app

cd my-app

npm start

您是否嘗試按照“ create-react-app”中的步驟進行操作?

`要創建新應用,您可以選擇以下方法之一:

像素

 npx create-react-app my-app

(npx隨npm 5.2及更高版本一起提供,請參閱舊版npm的說明)

npm

npm init react-app my-app

npm init可在npm 6+中使用

yarn create react-app my-app

在紗線0.25+中可以使用yarn create

要了解更多信息,請訪問: https : //github.com/facebook/create-react-app

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM