Using node with socket.io Follow
I am trying to develop an application using node with socket.io. Using just node I can compile and debug just fine, but when I try to use the socket.io module I get an error stating "Cannot find module 'socket.io'". Any ideas on what I need to do to configure Webstorm to see this module?
Please sign in to leave a comment.
Are you on Windows?
When playing with node recently I've found that globally installed modules (e.g. c:\Program Files (x86)\nodejs\node_modules\mysql) cannot be found, as node searches modules in a couple locations but not in the right one:
This '..', '..' looks like it asumes Unix paths (/usr/local/bin, usr/lib etc.)
Right now I workarounded this by adding NODE_PATH to my run configuration params:
That got it working.
Thank you very much!
Although I'm not sure if I should report a bug to Node devs or somethng.