vue-zendesk
vue-zendesk copied to clipboard
window.zE ist not a function
We are seeing some errors in sentry in the "onload" part:
TypeError: window.zE is not a function
at HTMLScriptElement.n.onload(./node_modules/@dansmaculotte/vue-zendesk/src/index.js:47:16)
Can you give me more details about the browser you use and the options set for the plugin? I cannot reproduce the error you're facing.
This call is performed in onload
callback, so I don't see why window.zE wouldn't be defined.
Did you check your Zendek key? Are your sure you can load the widget with a simple
@simonmaass - I guess you're using Nuxt or some kind of SSR for your app?
If Nuxt, when you add the plugin to your nuxt.config.js
, you should register it as client
plugin only like this:
plugins: [
'~/plugins/foo.client.js', // only in client side
...
]
or like this:
plugins: [
{ src: '~/plugins/client-only.js', mode: 'client' }, // only on client side
...
]
With this settings you should not experience any error like the one you describe.