octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
816 stars 182 forks source link

Server does not start - issue with socket.io-redis #62

Closed megastef closed 10 years ago

megastef commented 10 years ago

The first error was that socket.io did not find node_modules_redis - moved to this dir npm install redis ok, after that I got the error (See at the end). I used also npm install socket.io-redis - did not help because in skynet/lib/redis.js seems to be some wrong code, including scripts from socket.io subdir. Why not require ('redis')?

var redis = require('socket.io/node_modules/redis');
var RedisStore = require('socket.io/lib/stores/redis');

In any case I would appreciate any help to get the missing files, as npm install as described don't work.

node server.js 

module.js:340
    throw err;
          ^
Error: Cannot find module 'socket.io/lib/stores/redis'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Volumes/HDD/projects/iot/skynet/lib/redis.js:2:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
megastef commented 10 years ago

Server is starting up when this lines in lib/redis.js are changed to:

var redis = require('redis');
var RedisStore = require('socket.io-redis');

registering devices with enabled REDIS and Mongo seems to work fine.

before I made

npm install redis
npm install socket.io-redis
chrismatthieu commented 10 years ago

Thanks! You caught is in mid-update :) We are in the process of upgrading skynet from skocket.io 0.9.16 to 1.0.6. Our Redis updates were failing and we are still dealing with 1 more messaging bug before updating production with these updates. Keep watching this thread, twiitter, or join our #skynetim IRC channel for udpates.

chrismatthieu commented 10 years ago

This issue has been resolved in our latest release.