ReferenceError: ResizeObserver is not defined
See original GitHub issueResizeObserver is not available in server-side rendering. Since the last version, the polyfill has been removed and therefore it’s not possible to server-side render components that has nivo.
ReferenceError: ResizeObserver is not defined
at /Users/yagiz/Developer/iftrue/web/node_modules/@nivo/core/dist/nivo-core.cjs.js:1:12062
at useReducer (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:1537:57)
at Object.useState (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:1475:10)
at Object.useState (/Users/yagiz/Developer/iftrue/web/node_modules/react/cjs/react.development.js:1508:21)
at je (/Users/yagiz/Developer/iftrue/web/node_modules/@nivo/core/dist/nivo-core.cjs.js:1:12041)
at Ee (/Users/yagiz/Developer/iftrue/web/node_modules/@nivo/core/dist/nivo-core.cjs.js:1:14782)
at processChild (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
at resolve (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
at ReactDOMServerRenderer.render (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
at ReactDOMServerRenderer.read (/Users/yagiz/Developer/iftrue/web/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:10 (3 by maintainers)
Top Results From Across the Web
ReferenceError: ResizeObserver is not defined - Stack Overflow
I am writing tests using Jest for component which used chart.js to create a line chart. I am getting below error when I...
Read more >"ResizeObserver is not defined" error when running Jest #40
Hello Using useResizeObserver crashes my app's tests. Jest uses JSDom, which apparently doesn't support the ResizeObserver API.
Read more >ResizeObserver() - Web APIs | MDN
The ResizeObserver constructor creates a new ResizeObserver object, which can be used to report changes to the content or border box of an ......
Read more >ResizeObserver is not defined with nivo and NextJS-Reactjs
[Solved]-ReferenceError: ResizeObserver is not defined with nivo and NextJS-Reactjs ... It's likely that code is being run on server side (SSR), and ...
Read more >ResizeObserver JavaScript API - JavaScripture
Interactive API reference for the JavaScript ResizeObserver Object. ResizeObserver allows you to provide a function that is called asynchronously when the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mdirshaddev yes it does, as the polyfill was installed by default 😃 please see my first comment, the fix is going to be available in the next release, although, I don’t have a date yet.
I found a temporary workaround for this was just locking down the versions of
nivo
to the previous release. I’ve created a new issue for this to remind the maintainers that this is still an issue here: https://github.com/plouc/nivo/issues/1975