Node events.js:167 throw er; // Unhandled 'error' event

前端 未结 19 1974

I\'m trying to use JSON Server in a React App. However, I keep getting the following error.

events.js:167
  throw er; // Unhandled \'error\' event
  ^
Emitt         


        
相关标签:
19条回答
  • 2020-12-23 20:43

    test another adb device ... real smartphone or android studie or genymotion npm start in your project open new tab and run react-native run-android and press ctrl + c in past terminal tab

    i guess why this problem is we cant run http://localhost:8081/debugger-ui/

    0 讨论(0)
  • 2020-12-23 20:48

    Just run this command in your terminal

    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

    0 讨论(0)
  • 2020-12-23 20:49

    If you are running on Windows and have IIS running on your machine, ensure the IIS server is stopped if you are trying to run on port 8080. You can also change the port to not bring IIS into it.

    npm start -- --port 8000
    
    0 讨论(0)
  • 2020-12-23 20:49

    I have restored my hosts file to original state on Mac OS and it works for me. I edited this file yesterday and it made the problem. On this site you can copy the text of the original file https://pbxbook.com/other/mac-host.html

    0 讨论(0)
  • 2020-12-23 20:52

    I have the same issue. Basically, I am using node v10+ but my project was created in v8.11.4. All the modules were used according to the older version(v8), that's why I am facing the issue. So there are two solutions either update your module or downgrade the node.

    I have solved by downgrading the node from v10 to v8. Because some of the modules are not possible to update due to project dependency.

    0 讨论(0)
  • 2020-12-23 20:56

    In my case, it worked after I followed the steps below:

    1. Delete node_modules folder.
    2. Run npm install.
    3. Run npm update.
    4. Restart the system. (may be this did the trick)
    0 讨论(0)
提交回复
热议问题