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

Error in Nuxt3 - View360.EquirectProjection is not a constructor #431

Open
mamun-devxhub opened this issue Oct 17, 2023 · 1 comment
Open

Comments

@mamun-devxhub
Copy link

mamun-devxhub commented Oct 17, 2023

Description

In Nuxt3, I'm getting this View360.EquirectProjection is not a constructor Error for the version
"@egjs/vue3-view360": "^4.0.0-beta.7",

How to solve this,
and I also want to know the proper away to Integrate view360 for Nuxt3 Projects.

Steps to check or reproduce

In Nuxt3 I use this code..

<script setup>
import { View360, EquirectProjection } from "@egjs/vue3-view360";
import "@egjs/vue3-view360/css/view360.min.css";

const projection = new EquirectProjection({
  src: "/image.jpg"
});
</script>

<template>
  <View360 class="is-16by9" :projection="projection" />
</template>

And I'm getting this error..

index.vue:11 Uncaught (in promise) TypeError: View360.EquirectProjection is not a constructor
    at setup (index.vue:11:22)
    at callWithErrorHandling (chunk-S2INE2O3.js:1750:18)
    at setupStatefulComponent (chunk-S2INE2O3.js:7767:25)
    at setupComponent (chunk-S2INE2O3.js:7728:36)
    at mountComponent (chunk-S2INE2O3.js:6365:7)
    at hydrateNode (chunk-S2INE2O3.js:5397:11)
    at hydrateSubTree (chunk-S2INE2O3.js:6441:13)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-S2INE2O3.js:6461:13)
    at ReactiveEffect.run (chunk-S2INE2O3.js:1408:23)
    at instance.update (chunk-S2INE2O3.js:6580:52)

How to fix this.

@naashw
Copy link

naashw commented Nov 19, 2023

If you have this error : "vite_ssr_import_2.EquirectProjection is not a constructor"

you need to disable "SSR" in nuxt.config.ts export default defineNuxtConfig({ ssr:false });

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

2 participants