Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'socket.io-client/dist/socket.io.min.js' #138

Open
rafelamer opened this issue Aug 23, 2018 · 1 comment
Open

Comments

@rafelamer
Copy link

I'm trying to run signalmaster in a CentOS 7 machine. I'm doing the following to install it

git clone https://github.com/andyet/signalmaster.git
cd signalmaster
npm install

and then

node server.js

I get the error

module.js:478
throw err;
^

Error: Cannot find module 'socket.io-client/dist/socket.io.min.js'
at Function.Module._resolveFilename (module.js:476:15)
at Function.resolve (internal/module.js:27:19)
at Server.serveClient (/root/signalmaster/node_modules/socket.io/lib/index.js:101:33)
at new Server (/root/signalmaster/node_modules/socket.io/lib/index.js:48:8)
at Function.Server (/root/signalmaster/node_modules/socket.io/lib/index.js:40:41)
at module.exports (/root/signalmaster/sockets.js:6:23)
at Object. (/root/signalmaster/server.js:31:1)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)

@shawnmaten
Copy link

I know this is dated but for anyone else that comes across this issue, if you add the option serveClient: false to the socket.io listen call you can fix this error.

// sockets.js
// var io = socketIO.listen(server);
var io = socketIO.listen(server, { serveClient: false });

https://github.com/simplewebrtc/signalmaster/blob/master/sockets.js#L6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants