Closed Elektronenhirn108 closed 1 year ago
Thank you for this helpful Nuxt Module @wobsoriano! I really appreciate your work!
Sadly, I get the same Error using Node v18 and Nuxt v3.2.3.
The interesting thing is that it works after I built and deployed the app using yarn build
, but it doesn't work on the vite dev server using yarn dev
.
Regards, Marius
Hello,
I try to use this module, but I don't understand how to properly set it up based on the README.
I added
nuxt3-socket.io
to the modules and addedto my config. I also added the client example to a page. I had to remove
const socket2 = io('http://localhost:3069')
as it throws the errorio is not a function
. After that, the socket connects. Just for my understanding: this example connects to a default server socket that is included, running on the same port as the page?socket2
would be to connect to a different socket on a custom port & url?If I try to customise the default server socket by creating the file /server/socket/test.ts with the example from the README, I get the following error when starting nuxt:
ERROR [unhandledRejection] (0 , _nuxt3Socket.defineIOHandler) is not a function
What did I do wrong in both cases?It would be great if you can point me in the right direction.