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

后端 未结 11 909
抹茶落季
抹茶落季 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:06

    Try to execute export PATH=$PATH:/mnt/c/Windows/System32. Change the path /mnt/c/ to the path mounted on your wsl Windows (mount).

    if it works, insert the path /mnt/c/Windows/System32 into the file /etc/environment.

    here in my case this solution worked

    0 讨论(0)
  • 2020-12-15 15:08

    downgrading react-scripts to npm install react-scripts@2.1.8 works for me

    0 讨论(0)
  • 2020-12-15 15:13

    If your system is windows, set your environment variable, add %SystemRoot%\system32 to your PATH I met this error yesterday,hope it works to you. Don't forget reboot you PC

    0 讨论(0)
  • 2020-12-15 15:14

    I faces this issue while using the windows subsystem for Linux and solved it by adding C:\Windows\System32 to Environment Variables Path. Environment Variables can add as follow.

    go to

    control panel -> System and Security ->System -> Advanced System Settings.

    From the appearing dialog box, select Environment Variables, and then under System Variables select the path and select edit and add C:\Windows\System32. Restart the machine.

    0 讨论(0)
  • 2020-12-15 15:14

    in my case react-scripts was missing from the devDependencies adding it in devDependencies resolved it for me. Hope this helps

    0 讨论(0)
提交回复
热议问题