-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self is not defined #10
Comments
Any update on this? I have the same issue... |
same here on ssr. |
Same here. We're running the project locally as an SPA but it'll be SSR when it hits prod. The person who initially did the work has devved it with no issues but when we check out their branch and try to run the project, we see this error. |
I added the following to export default defineNuxtConfig({
plugins: [
{ src: '~/plugins/qrcode-vue3', ssr: false, mode: 'client' },
],
...
}) While my import QRCodeVue3 from "qrcode-vue3";
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component("QRCodeVue3", QRCodeVue3);
}) It works for me. I'm guessing it does not work with SSR, but it's good enough for me. |
This looks promising! I'll try and give it a go when I can, thanks :) |
I noticed it gives a warning. Don't know how to remove it :/ But it does work |
ReferenceError: self is not defined
at Object. (/node_modules/.pnpm/[email protected][email protected]/node_modules/qrcode-vue3/lib/index.js:1:248)
The text was updated successfully, but these errors were encountered: