Error: Cannot find module 'socket.io'

前端 未结 6 748
闹比i
闹比i 2020-12-16 10:02
[~]# node node.js

Error: Cannot find module \'socket.io\'

[~]# node -v
v0.10.10

socket.io installed:

npm install socket.io

npm W         


        
6条回答
  •  别那么骄傲
    2020-12-16 10:43

    I think that you have executed the command npm install socket.io in a different location and your files are in different directory.. So either run the command in the same directory which have your files or either mention the path where you have currently installed socket.io in your PATH variable.

提交回复
热议问题