Add nuxt-socket-io dependency to your project:

yarn add nuxt-socket-io
npm install nuxt-socket-io

Then, add nuxt-socket-io to the modules section of nuxt.config.js:

  modules: [
  io: {
    // Options

Finally, since the module requires Vuex to operate correctly, please at the minimum make sure you have a Vuex state defined:

export const state = () => ({})

The module needs this so it can register its own Vuex module