muxinc / next-video

The easiest way to add video in your Nextjs app.

Home Page:https://next-video.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'next-video' does not provide an export named 'withNextVideo'

bradbitler opened this issue · comments

I'm receiving the following error when I try to run the project locally after using the setup wizard. Any ideas?

import { withNextVideo } from "next-video";
^^^^^^^^^^^^^
SyntaxError: The requested module 'next-video' does not provide an export named 'withNextVideo'

thanks for the feedback! could you confirm next-video is installed as one of your dependencies in package.json? thanks

also have a look at this working minimal example https://github.com/luwes/next-video-app

it looks like there is an issue with ESM, thanks for reporting! we have a PR open to fix it.

I think the types is also missing.

image

image

Thanks for the feedback y'all! Could you try out version v0.9.0 and see if the issue is resolved?

The type issue and ESM are resolved. And I have a type suggestion, the videoConfig should be optional.

image

I made a PR for this, please check it out #106