adobe / adobe/react-spectrum-charts
TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner' when chart is used in Next.js 15.3.4.
- Dominant language
- TypeScript
- Stars
- 127
- Forks
- 29
- Avg merge
- 7d 2h
- Merged PRs (30d)
- 21
Description
### Provide a general summary of the issue here
When react-spectrum-charts are used in Next.js 15.3.4., I faced following error. After I changed Next.js verison to 14.2.25, I solved the problem. I think the version of React is the root cause. Are there any plan for react-spectrum-charts to support React 19?
✓ Compiled / in 5.6s (11054 modules)
⨯ TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')
at (ssr)/./node_modules/@adobe/react-spectrum-charts/dist/index.js (.next/server/vendor-chunks/@adobe.js:19:1)
at __webpack_require__ (.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(ssr)/./src/app/page.tsx:11:86)
at (ssr)/./src/app/page.tsx (.next/server/app/page.js:138:1)
at Object.__webpack_require__ [as require] (.next/server/webpack-runtime.js:33:43)
at JSON.parse () {
digest: '3392470
The dependency informaiton in package.json when I faced the problem.
"dependencies": {
"@adobe/react-spectrum": "^3.42.2",
"@adobe/react-spectrum-charts": "^1.18.1",
"canvas": "^3.1.1",
"next": "15.3.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vega": "^6.1.2",
"vega-lite": "^6.1.0"
},
### 🤔 Expected Behavior?
react-spectrum-charts support Next.js 15 and React 19.
### 😯 Current Behavior
✓ Compiled / in 5.6s (11054 modules)
⨯ TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')
at (ssr)/./node_modules/@adobe/react-spectrum-charts/dist/index.js (.next/server/vendor-chunks/@adobe.js:19:1)
at __webpack_require__ (.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(ssr)/./src/app/page.tsx:11:86)
at (ssr)/./src/app/page.tsx (.next/server/app/page.js:138:1)
at Object.__webpack_require__ [as require] (.next/server/webpack-runtime.js:33:43)
at JSON.parse () {
digest: '3392470
### 💁 Possible Solution
_No response_
### 🔦 Context
_No response_
### 🖥️ Steps to Reproduce
The dependency informaiton in package.json when I faced the problem.
"dependencies": {
"@adobe/react-spectrum": "^3.42.2",
"@adobe/react-spectrum-charts": "^1.18.1",
"canvas": "^3.1.1",
"next": "15.3.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vega": "^6.1.2",
"vega-lite": "^6.1.0"
},
### Version
1.18.1
### What browsers are you seeing the problem on?
Chrome
### If other, please specify.
_No response_
### What operating system are you using?
MacOS
### 🧢 Your Company/Team
_No response_
### 🕷 Tracking Issue
_No response_
Contributor guide
Research direction
Reproduce the error using the dependency versions listed in package.json and the import path shown from src/app/page.tsx. Compare the behavior with Next.js 14.2.25, then investigate the server-rendering failure in @adobe/react-spectrum-charts. Done means the chart works with Next.js 15.3.4 and React 19 without the ReactCurrentOwner error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100