robrighter / node-boilerplate

Everything you need to get started on a Node.js website with express and socket.IO
1.05k stars 161 forks source link

Cannot find module socket.io-node #1

Closed markc closed 14 years ago

markc commented 14 years ago

Excellent package, however, I followed the instructions after a clone but got this error...

~/node/node-boilerplate node project/app.js
node.js:289
    throw new Error("Cannot find module '" + request + "'");
          ^
Error: Cannot find module 'socket.io-node'
 at loadModule (node.js:289:15)
 at require (node.js:420:14)
 at Object.<anonymous> (/home/markc/node/node-boilerplate/project/app.js:6:12)
 at Module._compile (node.js:472:25)
 at Module._loadScriptSync (node.js:482:10)
 at Module.loadSync (node.js:352:12)
 at Object.runMain (node.js:535:24)
 at node.js:760:10
trvsdnn commented 14 years ago

I had a similar issue. I was able to fix it by updating node to the latest version... maybe check that if you haven't already?

robrighter commented 14 years ago

I tried reproducing this on a few machines. But could not get the error to occur.

techwraith commented 14 years ago

You can fix this error by changing:

, io = require('socket.io-node')

to

, io = require('Socket.IO-node')

It seems like capitalization is key here.

robrighter commented 14 years ago

Thanks Techwraith, just pushed a fix patch.

techwraith commented 14 years ago

No problem, thanks for pushing the patch. Love what you've done here!

robdrimmie commented 14 years ago

I encountered a similar error with node v0.1.98-31-g1c6671a. Upgrading to 0.1.104 resolved the problem.

cawoodm commented 13 years ago

It looks to me like this issue is still open on the latest versions (5.4 & 5.5) under windows. For example, I get this error when I try to run node-inspector. Maybe it's because I have to install the module socket.io but I can't seem to find out how...