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: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') #20

Open
theDanielJLewis opened this issue Oct 29, 2024 · 1 comment

Comments

@theDanielJLewis
Copy link

This might be a React 19 / Next.js 15 thing, but I'm now getting the following error when I import react-audio-player:

Cannot read properties of undefined (reading 'ReactCurrentDispatcher')

This happens with and without Next.js 15's new --turbo mode in dev. It happens after the site has been built, too.

It happens even with a completely fresh Next.js installation with nothing but AudioPlayer in use.

@KlotzJesse
Copy link

KlotzJesse commented Nov 21, 2024

@samhirtarif Can be fixed by react-audio-player by correctly not-bundling react in the vite.config.ts
line 20:
external: ['react', 'react-dom'],

to

external: ["react", /^react\/.*/, "react-dom", /react-dom\/.*/],

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