Try to execute npm install socket.io
in the folder where your node.js file is (where you require the module). npm creates a folder node_modules
wherever you execute npm install socket.io
and you probably didn't do this in the correct folder.
npm install supervisor -g
did work because -g is the global flag and you can basically do that anywhere.