react-stockcharts
react-stockcharts copied to clipboard
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
Does anyone have an idea why the fitWidth component is not working and how to fix this?
fitWidth.js:59 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
at ResponsiveComponent.<anonymous> (fitWidth.js:59:1)
at callCallback (react-dom.development.js:13122:1)
at commitUpdateQueue (react-dom.development.js:13143:1)
at commitLayoutEffectOnFiber (react-dom.development.js:23263:1)
at commitLayoutMountEffects_complete (react-dom.development.js:24578:1)
at commitLayoutEffects_begin (react-dom.development.js:24564:1)
at commitLayoutEffects (react-dom.development.js:24502:1)
at commitRootImpl (react-dom.development.js:26779:1)
at commitRoot (react-dom.development.js:26638:1)
at finishConcurrentRender (react-dom.development.js:25937:1)
(anonymous) @ fitWidth.js:59
callCallback @ react-dom.development.js:13122
commitUpdateQueue @ react-dom.development.js:13143
commitLayoutEffectOnFiber @ react-dom.development.js:23263
commitLayoutMountEffects_complete @ react-dom.development.js:24578
commitLayoutEffects_begin @ react-dom.development.js:24564
commitLayoutEffects @ react-dom.development.js:24502
commitRootImpl @ react-dom.development.js:26779
commitRoot @ react-dom.development.js:26638
finishConcurrentRender @ react-dom.development.js:25937
performConcurrentWorkOnRoot @ react-dom.development.js:25765
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:18572 The above error occurred in the <fitWidth(CandleStickChartWithCHMousePointer)> component:
at ResponsiveComponent (http://localhost:3000/static/js/bundle.js:143641:7)
at div
at http://localhost:3000/static/js/bundle.js:4678:66
at Container (http://localhost:3000/static/js/bundle.js:32132:19)
at ChartFn (http://localhost:3000/main.79350bc3cb6201a53177.hot-update.js:58:5)
at main
at http://localhost:3000/static/js/bundle.js:4678:66
at Box (http://localhost:3000/static/js/bundle.js:32997:72)
at div
at http://localhost:3000/static/js/bundle.js:4678:66
at Box (http://localhost:3000/static/js/bundle.js:32997:72)
at Live (http://localhost:3000/static/js/bundle.js:2682:76)
at Outlet (http://localhost:3000/static/js/bundle.js:132320:26)
at div
at http://localhost:3000/static/js/bundle.js:4678:66
at Box (http://localhost:3000/static/js/bundle.js:32997:72)
at div
at App (http://localhost:3000/static/js/bundle.js:883:5)
at Routes (http://localhost:3000/static/js/bundle.js:132412:5)
at Routes (http://localhost:3000/static/js/bundle.js:112:5)
at InnerThemeProvider (http://localhost:3000/static/js/bundle.js:32210:70)
at ThemeProvider (http://localhost:3000/static/js/bundle.js:31595:5)
at ThemeProvider (http://localhost:3000/static/js/bundle.js:32230:5)
at Styling (http://localhost:3000/static/js/bundle.js:307:107)
at FinnhubProvider (http://localhost:3000/static/js/bundle.js:3525:5)
at LocalizationProvider (http://localhost:3000/static/js/bundle.js:39756:81)
at Provider (http://localhost:3000/static/js/bundle.js:128474:5)
at SnackbarProvider (http://localhost:3000/static/js/bundle.js:96908:24)
at Router (http://localhost:3000/static/js/bundle.js:132345:15)
at BrowserRouter (http://localhost:3000/static/js/bundle.js:131154:5)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
I am also having this issue. Have you solved it yet?
@ngminhhieu nope
Any updates? Also having this issue
I am also having this issue. Anyone able to solve it?
Yeah, I was facing the same error.It was happening because I was using the reactjs version 18.x with reactstockcharts.I solved this error by downgrading the reactjs version to 16.
"react": "^16.14.0", "react-dom": "^16.14.0",