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

NextJS Page Router: SyntaxError: Cannot use import statement outside a module #331

Open
jonathangerbaud opened this issue Nov 8, 2024 · 1 comment

Comments

@jonathangerbaud
Copy link

Hello,

I've been trying to use Revideo from your NextJS starter template. And it works.

Problem is that I don't want to use NextJS App Router, I want to use the Page Router.

And when I do so, I always get the same error, whatever configuration I change:

SyntaxError: Cannot use import statement outside a module

So, I don't really know why it works in app router and not in the page router, all I know is that if I go to node_modules, and add "type": "module" in package.json for the player-react and core modules, it somehow clears the error (I got another one, but different one).

Can you make sure you're producing ESM packages so I can use NextJS Page Router?

@justusmattern27
Copy link
Member

I believe that this will be fixed with the upcoming release, #328 should fix it - is that right? @hkonsti

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