Playing around Microsoft\'s botframework, when I try to run the app.js file, which is the main file of the bot, the first time is fine, after I close the bot emulator, and a
This happens when you open another project without having closed the one you were already using, remember to always use Ctrl+c when you finish using a project. Try rebooting your PC and it should work again. At least that's what worked for me.
Even I was also getting the error while running node server. i.e events.js:183 throw er; // Unhandled 'error' event ^ In my case, I was getting that error because I had changed Mysql port number 3306 to 3307 while installing. I recovered from from that error by changing Mysql port number to 3306, and now its running.
If you are on mac, to make sure nothing is running on the same port, do:
killall node
and restart your app.
You might be running some other application on the same port, and it is still running. So you can't run two applications on the same port.
Try to close the process that is using your port.
netstat -tulnp | grep <port_number>
Installing the below pakcage fixed it for me forever.
npm install ws@3.3.2 --save-dev --save-exact
Run this command in your terminal :
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf:
fs.inotify.max_user_watches=524288
Then execute:
sysctl --system
This will also persist across reboots.
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details
Either one of the solutions will work . If not then restart your system and check again.
Try specify a different port before you run the node.js application.
For example, if you have collision on port 3978, set a different port before you start the server.js:
export PORT=3979