Skip to content
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

[nuxt] [request error] [unhandled] [500] self is not defined #91

Closed
578838516 opened this issue Oct 14, 2022 · 5 comments
Closed

[nuxt] [request error] [unhandled] [500] self is not defined #91

578838516 opened this issue Oct 14, 2022 · 5 comments

Comments

@578838516
Copy link

I introduced error in nuxt3 rc 11

[nuxt] [request error] [unhandled] [500] self is not defined
at Object. (./node_modules/vue-pdf-embed/dist/vue3-pdf-embed.js:1:252)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap. (node:internal/modules/esm/translators:170:29)
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)

Codesandbox link

@brienpacholec
Copy link

Same here

@cambea
Copy link

cambea commented Dec 2, 2022

Same here too :(

@getshaun24
Copy link

any update on this ?!

@akbarism
Copy link

same here

@abdmdjr
Copy link

abdmdjr commented Jan 26, 2023

In Nuxt 3, create a file in /plugins and name it vue-pdf-embed.client.ts with this code ->

import VuePdfEmbed from "vue-pdf-embed";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.component("vue-pdf-embed", VuePdfEmbed);
});

In your page/component, use it like that :
<vue-pdf-embed :source="post.file" />

@hrynko hrynko closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants