next
next copied to clipboard
Next 15: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
Expected Behavior
P5-wrapper next to work on next 15.
Actual Behavior
Getting this error:
Doing some research, it seems like this error pops up when there is a mismatch between react and react-dom versions: https://stackoverflow.com/a/78667959
Running with or without Turbopack didn't make a difference. Downgrading to Next 14 doesn't have the same issue.
Steps to Reproduce the Problem
pnpx create-next-app@latestpnpm add @p5-wrapper/next @p5-wrapper/react- Add example component from the readme.
4.
pnpm dev
Specifications
Package Version: 1.0.3
{
"name": "p5-wrapper-next",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev ",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@p5-wrapper/next": "^1.0.3",
"@p5-wrapper/react": "^4.4.2",
"next": "15.1.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.1.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
A post with more detail regarding what packages are causing issues here: https://stackoverflow.com/a/79350215/3668599
Same thing happening for me!
+1 , breaks with Next 15
I was able to get the error to go away by removing @p5-wrapper/next, upgrading to the latest 5.x alpha of @p5-wrapper/react, and just creating the dynamic component myself by copying https://github.com/P5-wrapper/next/blob/master/src/main.tsx into my components directory and importing it from there.
@sreyemnayr do you have a code example with packages ?
@sreyemnayr do you have a code example with packages ?
You can have a look at my repo if you like: https://github.com/sreyemnayr/circle-of-fifths/blob/main/src/components/PlaylistArt.tsx
It’s a mess, but you can see what it’s using and swap out the locally defined wrapper with the package version and see if it still breaks. It requires a Spotify api key. I don’t really have time to create a simple reproduction at the moment, sorry!
Sorry, i switched back to next 14, thanks for answering anyway and for the Package. I had thé basic set up créated by create next app with react 19 and next 15.
Le jeu. 22 mai 2025 à 20:45, Ryan @.***> a écrit :
sreyemnayr left a comment (P5-wrapper/next#85) https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631
@sreyemnayr https://github.com/sreyemnayr do you have a code example with packages ?
You can have a look at my repo if you like: https://github.com/sreyemnayr/circle-of-fifths/blob/main/src/components/PlaylistArt.tsx
It’s a mess, but you can see what it’s using and swap out the locally defined wrapper with the package version and see if it still breaks. It requires a Spotify api key. I don’t really have time to create a simple reproduction at the moment, sorry!
— Reply to this email directly, view it on GitHub https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACE7NZED5Q5L5OGLRVHW25D27YLM7AVCNFSM6AAAAABUV3XXOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBSGIZDSNRTGE . You are receiving this because you commented.Message ID: @.***>
No pb, thx
Le jeu. 22 mai 2025 à 20:45, Ryan @.***> a écrit :
sreyemnayr left a comment (P5-wrapper/next#85) https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631
@sreyemnayr https://github.com/sreyemnayr do you have a code example with packages ?
You can have a look at my repo if you like: https://github.com/sreyemnayr/circle-of-fifths/blob/main/src/components/PlaylistArt.tsx
It’s a mess, but you can see what it’s using and swap out the locally defined wrapper with the package version and see if it still breaks. It requires a Spotify api key. I don’t really have time to create a simple reproduction at the moment, sorry!
— Reply to this email directly, view it on GitHub https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACE7NZED5Q5L5OGLRVHW25D27YLM7AVCNFSM6AAAAABUV3XXOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBSGIZDSNRTGE . You are receiving this because you commented.Message ID: @.***>
No pb thx again
Le jeu. 22 mai 2025 à 20:45, Ryan @.***> a écrit :
sreyemnayr left a comment (P5-wrapper/next#85) https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631
@sreyemnayr https://github.com/sreyemnayr do you have a code example with packages ?
You can have a look at my repo if you like: https://github.com/sreyemnayr/circle-of-fifths/blob/main/src/components/PlaylistArt.tsx
It’s a mess, but you can see what it’s using and swap out the locally defined wrapper with the package version and see if it still breaks. It requires a Spotify api key. I don’t really have time to create a simple reproduction at the moment, sorry!
— Reply to this email directly, view it on GitHub https://github.com/P5-wrapper/next/issues/85#issuecomment-2902229631, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACE7NZED5Q5L5OGLRVHW25D27YLM7AVCNFSM6AAAAABUV3XXOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBSGIZDSNRTGE . You are receiving this because you commented.Message ID: @.***>
Try using version 2.0.0 and let me know how it goes. 👍🏻