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

ResizeObserver not defined for mobile screens #1928

Closed
nikasvan opened this issue Feb 14, 2022 · 6 comments
Closed

ResizeObserver not defined for mobile screens #1928

nikasvan opened this issue Feb 14, 2022 · 6 comments
Labels

Comments

@nikasvan
Copy link

Describe/explain the bug

Trying to run nivo/heatmap in React Native(Expo) but getting the error message: "Can't find variable: ResizeObserver"

Package.json looks like this:

"@nivo/colors": "0.79.1",
"@nivo/core": "0.79.0",  
"@nivo/heatmap": "0.79.1",  
"@nivo/legends": "0.79.1",
"expo": "~44.0.0",
"expo-status-bar": "~1.2.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-elements": "^3.4.2",
"react-native-web": "0.17.1"  

By looking into issues noticed that something similar happened a month ago. The fix was provided for it #1886 here but I do not think that newest release was published(to npm) as the version on npm is still 0.79.0 but the latest GitHub commits to master are for 0.79.1. Not sure if this is related.

Screenshots
Simulator Screen Shot - iPhone 12 Pro - 2022-02-14 at 20 12 40

Smartphone (please complete the following information):

  • Device: iPhone 12 pro
  • OS: 15.2
@nikasvan nikasvan changed the title ResizeObserver not defined(Mobile screens) ResizeObserver not defined(for mobile screens) Feb 14, 2022
@nikasvan nikasvan changed the title ResizeObserver not defined(for mobile screens) ResizeObserver not defined for mobile screens Feb 14, 2022
@plouc
Copy link
Owner

plouc commented Feb 14, 2022

@nikasvan, yes, it's been fixed but not released yet.

@nikasvan
Copy link
Author

Thanks for the answer @plouc. Is it possible to fix this(locally) before this change is released?

@bdefore
Copy link
Contributor

bdefore commented Mar 12, 2022

if you want to avoid this script error impacting non-nivo use and you're ok with suppressing charts for end-of-life webkits, you can suppress nivo for now with a helper:

export const isOldWebkit = () =>
  typeof global.ResizeObserver === 'undefined'

@seanperkins
Copy link

seanperkins commented Mar 28, 2022

Do we know when the next release will be that includes the fix to this?

@stale
Copy link

stale bot commented Jun 27, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jun 27, 2022
@stale
Copy link

stale bot commented Jul 6, 2022

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@stale stale bot closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants