Why npm start is throwing events.js:187 throw er; // Unhandled 'error' event in my react project?

后端 未结 11 907
抹茶落季
抹茶落季 2020-12-15 14:35

While starting the server for the first time just after the code checkout , my react js project is throwing error \"events.js:187 throw er; // Unhandled \'error\'

11条回答
  •  有刺的猬
    2020-12-15 15:02

    In your package.json file try lowering the version of "react-scripts" to "2.1.8":

    "dependencies": { 
        "@testing-library/jest-dom": "^4.2.4",  
        "@testing-library/react": "^9.4.0",  
        "@testing-library/user-event": "^7.2.1",  
        "react": "^16.12.0",  
        "react-dom": "^16.12.0",  
        "react-scripts": "2.1.8"  
      },  
    

    Above works for me.

提交回复
热议问题