React::How to Fix “throw er; // Unhandled ‘error’ event”?

 Have you ever been to this error? I came across this once. When I was trying to run react app in localhost it gave me this.

some errors are tricky that need some more research and logic. It was one of them. I resolved this issue but it took 2 days.

Execute the above command to kill all current processes and see if it will work or not.

Try to install the above npm package. It has resolved my issue.

If it doesn’t help then it may be a cache problem. You can remove it by the below command.

See it works or not. if not try to give permission to your all files. It might be a permission problem sometimes that restricts installation packages.

Now try to remove node_modules and install packages with npm i. If it will work better then try to avoid ENOSPC by below command:

Above code with increase user_watches and avoid ENOSPC.

Source of Post:

Happy Coding!

Post a Comment