Skip to content

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

Open
@hkleow

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions