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

Can't get this to work on Nuxt 3 #287

Open
hkleow opened this issue Apr 23, 2024 · 0 comments
Open

Can't get this to work on Nuxt 3 #287

hkleow opened this issue Apr 23, 2024 · 0 comments

Comments

@hkleow
Copy link

hkleow commented Apr 23, 2024

Can't get this plugin to work on nuxt 3.
I've tried these
import "videojs-vr";
import "videojs-vr/dist/videojs-vr.js";
import "videojs-vr/dist/videojs-vr.min.js";

it will return error
ERROR return [nuxt] [request error] [unhandled] [500] Cannot use import statement outside a module

ERROR: return navigator is not defined

i've included codesandbox
https://codesandbox.io/p/github/hkleow/videojsvrdemo/

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. https://codesandbox.io/p/github/hkleow/videojsvrdemo/

Results

Expected

Please describe what you expected to see.

Actual

Please describe what actually happened.

Error output

If there are any errors at all, please include them here.

ERROR return [nuxt] [request error] [unhandled] [500] Cannot use import statement outside a module

ERROR: return navigator is not defined

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

what version of videojs does this occur with?
"video.js": "^8.10.0",

browsers

what browser are affected?

OSes

what platforms (operating systems and devices) are affected?

plugins

are any videojs plugins being used on the page? If so, please list them below.
no plugin only videojs-vr

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

1 participant