[]问下关于websocket的问题
用npm安装好了websocket,然后按照LayaAir技术手册里面的代码建了一个服务端的程序,为啥用node运行的时候弹出" Cannot find module 'ws'"?
C:\Users\Administrator\Desktop>node jjj.js
module.js:472
throw err;
^
Error: Cannot find module 'ws'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Administrator\Desktop\jjj.js:1:85)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
C:\Users\Administrator\Desktop>
C:\Users\Administrator\Desktop>node jjj.js
module.js:472
throw err;
^
Error: Cannot find module 'ws'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Administrator\Desktop\jjj.js:1:85)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
C:\Users\Administrator\Desktop>
没有找到相关结果
已邀请:
要回复问题请先登录
3 个回复
cuixueying
赞同来自: zhang92tong
zhang92tong
赞同来自:
1604388676用户
赞同来自: