In a recent Laravel project I came across this rather annoying error:
1 |
events.js:160 throw er; // Unhandled 'error' event |
Though I didn't save the text of the whole error, here's a screenshot of the ending part of the error log:
The solution:
It's really easy. All this really means so far is that there's a code mis-match probably between what you're Node.js & NPM versions are and what the code you're using requires and uses. First and foremost: upgrade your Node.js (and thus NPM) install to the latest version.
After that, clear out the node_modules folder, clear the node cache and reinstall the node modules. You can do the following commands:
1 2 3 |
rm -rf node_modules npm cache clean npm install |
At which point it'll start re-installing all the modules:
[…] [SOLVED] events.js:160 throw er; // Unhandled 'error' event – In a recent Laravel project I came across this rather annoying error Though I didn't save the text of the whole error, here's a screenshot of the ending part of the error log […]