A
A
Alexey Maksimov2016-01-25 19:45:02
Node.js
Alexey Maksimov, 2016-01-25 19:45:02

Can't see socket.io, what could be the problem?

Installed node.js on CentOS 6 and then socket.io via npm install socket.io. When trying to connect it to any project, it gives an error that socket.io was not found. What is the matter and how to solve the problem?

module.js:340
    throw err;
          ^
Error: Cannot find module 'socket.io'
    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> (/url/ig_socket.js:2:10)
    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 Function.Module.runMain (module.js:497:10)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
timfcsm, 2016-01-25
@additivex

Have you installed the module globally?
npm install -g socket.io

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question