搜尋

首頁  >  問答  >  主體

遇到錯誤:無法載入設定檔"react-app"以進行渲染我的React應用程式

<p>每次渲染我的React應用程式時,我都會遇到以下錯誤:</p> <p>[eslint] 無法載入配置「react-app」以進行擴充。 </p> <p>這是我的React Web應用程式的package.json檔案:</p> <pre class="brush:php;toolbar:false;">{ "name": "monstors-rolodex", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "eslint-config-react": "^1.1.7" } }</pre> <p>有人能幫忙解決這個錯誤嗎? </p>
P粉463291248P粉463291248469 天前483

全部回覆(1)我來回復

  • P粉574695215

    P粉5746952152023-08-14 19:34:19

    你可以嘗試這樣做:

    yarn add eslint-config-react-app -D

    回覆
    0
  • 取消回覆