You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to install the plugin on a Vue 3 project (w/ Nuxt 3) it errors:
500
Cannot set properties of undefined (setting 'pusher')
at Object.install (http://localhost:3000/_nuxt/node_modules/.vite/deps/vue-pusher.js?v=ae3370f2:6061:30)
at Object.use (http://localhost:3000/_nuxt/node_modules/.vite/deps/vue.js?v=ae3370f2:4690:18)
at http://localhost:3000/_nuxt/plugins/pusher.client.js:4:18
at fn (http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs?v=ae3370f2:141:27)
at callWithNuxt (http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs?v=ae3370f2:146:12)
at applyPlugin (http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs?v=ae3370f2:92:29)
at applyPlugins (http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs?v=ae3370f2:101:11)
at async initApp (http://localhost:3000/_nuxt/home/akiraserikawa/Sites/nuxt-demo/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/entry.mjs:39:7)
this caused by changes in Vue 3, where Vue.prototype does not exist anymore, so the plugin cannot work:
module.exports = {
install: function (Vue, options) {
var pusher = new VuePusher(options.api_key, options.options);
Vue.prototype.pusher = pusher;
Vue.prototype.$pusher = pusher.pusher; // Just in case they want to manage it themselves.
}
};
I guess it would require the plugin to use app.config.globalProperties instead.
Trying to install the plugin on a Vue 3 project (w/ Nuxt 3) it errors:
this caused by changes in Vue 3, where
Vue.prototype
does not exist anymore, so the plugin cannot work:I guess it would require the plugin to use
app.config.globalProperties
instead.https://vuejs.org/api/application.html#app-config-globalproperties
The text was updated successfully, but these errors were encountered: