Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Error document is not defined when connect channel by adonis-websocket-client #65

Open
revan2006 opened this issue Aug 28, 2017 · 1 comment

Comments

@revan2006
Copy link

revan2006 commented Aug 28, 2017

Hello,
not sure if it real issue, but you can't connect to channel it error document is not defined ('node_modules\adonis-websocket-client\dist\ws.js'). in here my code:

import Vue from 'vue' import ws from 'adonis-websocket-client' const wsVuePlugin = function (Vue, url, options) { Vue.prototype.$io = ws(url, options) } Vue.use(wsVuePlugin, 'http://localhost:3000', {})

export default { created: function () { this.$io.channel('chat').connect(console.log) } }

This question is available on Nuxt.js community (#c54)
@lowi
Copy link

lowi commented May 18, 2019

Make sure you only create the websocket on client, not on server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants