Code Monkey home page Code Monkey logo

Comments (13)

matias91 avatar matias91 commented on June 2, 2024 11

I found a workaround for this error, without modifying the index of react-native-safe-area-view, at least for my use case.
I'm also using an older version of react-navigation, and update it isn't an option right now.

What I did was to add a resolution in my package.json with react-native-safe-area-view v1.1.0 . Like this:

"resolutions": {
  "react-native-safe-area-view": "1.1.0"
}

Resolutions are only available with yarn: https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

And after that I had to use SafeAreaProvider from react-native-safe-area-context to wrap my app in my entry file:

<SafeAreaProvider>
    <Provider store={store}>
       <AppNavigator  />
    </Provider>
</SafeAreaProvider>

expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.18.3

Hope this helps someone.

from react-native-safe-area-view.

fonov avatar fonov commented on June 2, 2024 10

react-navigation used old version react-native-safe-area-view for solved this issue you need update on fresh version react-navigation

from react-native-safe-area-view.

enrickdl avatar enrickdl commented on June 2, 2024 3

@fonov I can't update react-navigation right now. Do you know if there's another solution?

Currently upgrading RN Version to 0.63 and using react-navigation 3.3.2.

From StackOverflow, I found that if you remove _component from this.view._component.measureInWindow inside react-native-safe-area-view index file at node_modules, it solves the problem, but it's not a great solution.

from react-native-safe-area-view.

halaharr avatar halaharr commented on June 2, 2024 1

I am having the same issue. Please help. I am also using react-redux, is that the reason I am getting the error?

from react-native-safe-area-view.

enrickdl avatar enrickdl commented on June 2, 2024 1

@harrhys Great to hear that! Just FYI, I end it up upgrading react-navigation from v3 to v4, since it's very similar, I didn't have problems and it was very simple. I would suggest that as well.

from react-native-safe-area-view.

harrhys avatar harrhys commented on June 2, 2024 1

Sure @enrickdl ..Thans for you suggestion, I will definitely consider upgrading from v3 to v4.
Best Regards,
Harrhy

from react-native-safe-area-view.

callyb avatar callyb commented on June 2, 2024 1

Thank you @enrickdl - solved my problem too - I'm stuck on an old version of react navigation and must update but really didn't want it to be this month!!!

from react-native-safe-area-view.

Trouble106 avatar Trouble106 commented on June 2, 2024 1

@matias91 Thank you so muchhhhh
it's work for me with
expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.13.0

from react-native-safe-area-view.

christopherguyton avatar christopherguyton commented on June 2, 2024

Trying to find "react-safe-area-view" in node modules to fix this but it doesn't seem to exist in my project.

from react-native-safe-area-view.

harrhys avatar harrhys commented on June 2, 2024

@fonov I can't update react-navigation right now. Do you know if there's another solution?

Currently upgrading RN Version to 0.63 and using react-navigation 3.3.2.

From StackOverflow, I found that if you remove _component from this.view._component.measureInWindow inside react-native-safe-area-view index file at node_modules, it solves the problem, but it's not a great solution.

Thanks a LOT enrickdl..It really helped me and the issue is resolveed...

from react-native-safe-area-view.

DaNiELChIoRo avatar DaNiELChIoRo commented on June 2, 2024

it didn't work for me
expo SDK:38,
"react-native-paper": "2.16.0"
react-navigation: 4.4.0

from react-native-safe-area-view.

ljz-peralta avatar ljz-peralta commented on June 2, 2024

@matias91, Thank you for your suggestion on fixing this issue!
It worked for me as well although I forced upgrade the [email protected] to
[email protected] since it didn't work on [email protected].

expo SDK: 39
react: 16.13.1
react-native: 0.63.3
react-navigation: 2.18.3

from react-native-safe-area-view.

eramudeep avatar eramudeep commented on June 2, 2024

I found a workaround for this error, without modifying the index of react-native-safe-area-view, at least for my use case.
I'm also using an older version of react-navigation, and update it isn't an option right now.

What I did was to add a resolution in my package.json with react-native-safe-area-view v1.1.0 . Like this:

"resolutions": {
  "react-native-safe-area-view": "1.1.0"
}

Resolutions are only available with yarn: https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

And after that I had to use SafeAreaProvider from react-native-safe-area-context to wrap my app in my entry file:

<SafeAreaProvider>
    <Provider store={store}>
       <AppNavigator  />
    </Provider>
</SafeAreaProvider>

expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.18.3

Hope this helps someone.

Not worked for me:
"react": "16.11.0",
"react-native": "0.62.2",
"react-navigation": "2.18.2"
"react-native-safe-area-context": "^3.1.9",

from react-native-safe-area-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.