actioncable-vue icon indicating copy to clipboard operation
actioncable-vue copied to clipboard

After import actioncable-vue: ReferenceError: self is not defined

Open phlegx opened this issue 3 years ago • 2 comments

Describe the bug I use a SSR environment (not Nuxt). If I import actioncable-vue I get this error: ReferenceError: self is not defined

To Reproduce Steps to reproduce the behaviour:

  1. Follow install instructions from actioncable-vue.

Expected behaviour I'm not able to conditionally import actioncable-vue (e.g. only for the client).

Plugin version (please complete the following information):

Version: 2.4.6 Vue: 2.6.12 SSR: uvue

phlegx avatar May 05 '21 20:05 phlegx

I was running into the same issue with vitejs and solved it by only calling Vue.use(ActionCableVue, actionCableConfigs) from the client entry point enty-client.js instead of in app.js.

I don't know uvue very well, check if you can do something similar there.

Not sure if this should or can be handled by the plugin itself, I'll let the maintainers answer that.

ggraca avatar May 14 '21 13:05 ggraca

See also https://github.com/rails/rails/pull/47939

bmulholland avatar Nov 04 '23 11:11 bmulholland