是否可以将 Socket.io 与 NuxtJs 一起使用? [英] Is it possible to use Socket.io with NuxtJs?
本文介绍了是否可以将 Socket.io 与 NuxtJs 一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的 Nuxtjs 中使用 socket.io.可能吗?
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
推荐答案
使用 Nuxt.js + Socket.io 的更好方法是遵循 core-team 的这个官方示例:https://github.com/nuxt/nuxt.js/tree/dev/examples/with-sockets
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
这篇关于是否可以将 Socket.io 与 NuxtJs 一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文