Reputation: 728
I was following Aurelia tutorials. Specifically the production setup part
http://aurelia.io/docs.html#/aurelia/framework/1.0.0-beta.1.1.4/doc/article/a-production-setup
After nmp install and jspm install, gulp watch throws error:
module.js:327 throw error
Error: Cannot find module 'socket.io'
What's causing this?
It traces error to ...\browser-sync\lib\sockets.js:3:15
Upvotes: 1
Views: 117
Reputation: 728
So I realized that socket.io was missing in the browser-sync dependencies. Had to run npm install in browser-sync folder. Also I was not aware of the fact that npm install will check only the root dependencies. If one of its dependencies is missing a dependency of its own, it won't tell you. You can run nmp ls to check for missing dependencies.
Upvotes: 1