socket.ionuxt.js

Is it possible to use Socket.io with NuxtJs?


I want to use socket.io in my Nuxtjs. Is it possible?

I tried this tutorial but I am getting the following error:

These dependencies were not found:

* fs in ./node_modules/socket.io/lib/index.js
* uws in ./node_modules/engine.io/lib/server.js

Solution

  • The better way to play with Nuxt.js + Socket.io is to follow this official example from core-team: https://github.com/nuxt/nuxt.js/tree/dev/examples/with-sockets