Cannot find module “socket.io”

血红的双手。 提交于 2021-01-28 05:01:39

问题


Hi i am trying to run the nodejs script and it pops up the following error message:

enter image description here

I have installed socket.io globally using following command:

>npm install -g socket.io

but still no luck.

Any help?


回答1:


Use it locally instead, and save to your package.json

npm install socket.io --save


来源:https://stackoverflow.com/questions/26521905/cannot-find-module-socket-io

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!