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

Unable to resolve "./NavigationNativeContainer" from "node_modules/@react-navigation/native/src/index.tsx" #8163

Closed
soulsako opened this issue May 1, 2020 · 19 comments
Labels

Comments

@soulsako
Copy link

soulsako commented May 1, 2020

I am using managed Expo SDK 37 app with React Navigation 5.

When I run expo start -c, i get this the error:

Unable to resolve "./NavigationNativeContainer" from "node_modules/@react-navigation/native/src/index.tsx"

My package.json dependencies:

"dependencies": {
    "@expo/vector-icons": "^10.0.6",
    "@react-native-community/masked-view": "0.1.6",
    "@react-navigation/native": "^5.2.1",
    "@react-navigation/stack": "^5.2.16",
    "expo": "~37.0.3",
    "expo-asset": "^8.1.4",
    "expo-constants": "~9.0.0",
    "expo-font": "^8.1.1",
    "expo-permissions": "~8.1.0",
    "prop-types": "^15.7.2",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-reanimated": "~1.7.0",
    "react-native-safe-area-context": "0.7.3",
    "react-native-screens": "~2.2.0",
    "react-native-web": "~0.11.7",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0"
  },
@soulsako soulsako added the bug label May 1, 2020
@joeyscarim
Copy link

same issue in a react native cli project i started today

@ghost
Copy link

ghost commented May 1, 2020

same issue in a react native expo project i started today

@shailu26
Copy link

shailu26 commented May 1, 2020

what is this error?
its frustrating

@Karthik-B-06
Copy link

Updating @react-navigation/native library to the latest caused this problem to me.

@shailu26
Copy link

shailu26 commented May 1, 2020

what version should we use?

@kristjanm
Copy link

I fixed (temporarily) by installing a bit older version:
npm install @react-navigation/native@5.1.7

I guess will be fixed by someone very soon

@shailu26
Copy link

shailu26 commented May 1, 2020

what version you are using for this "@react-navigation/drawer", @react-navigation/stack

@Charis-W
Copy link

Charis-W commented May 1, 2020

  1. rm -rf node_modules package-lock.lock
  2. npm cache clean --force
  3. npm install

@shailu26
Copy link

shailu26 commented May 1, 2020

I fixed (temporarily) by installing a bit older version:
npm install @react-navigation/native@5.1.7

I guess will be fixed by someone very soon

fixed that issue

@Karthik-B-06
Copy link

The latest version of @react-navigation/bottom-tabs also has an issue.

@raajnadar
Copy link
Member

Try this

  1. Upgrade to latest version
  2. Delete the lock file (yarn.lock or package.lock)
  3. Clear the cache yarn cache clean or npm cache clean
  4. Run yarn or npm install
  5. Run npx react-native run-android --reset-cache

@kristjanm
Copy link

Got the latest version working with instructions here: https://reactnavigation.org/docs/troubleshooting/ (saved this link for future).

@soulsako
Copy link
Author

soulsako commented May 1, 2020

I fixed (temporarily) by installing a bit older version:
npm install @react-navigation/native@5.1.7
I guess will be fixed by someone very soon

fixed that issue

I fixed (temporarily) by installing a bit older version:
npm install @react-navigation/native@5.1.7

I guess will be fixed by someone very soon

Downgrading to @react-navigation/native@5.1.7 still hasn't fixed the issue

@stormbreaker1206
Copy link

thanks kristjanm this help me

@satya164 satya164 closed this as completed May 1, 2020
@jamesdarabi
Copy link

Got the latest version working with instructions here: https://reactnavigation.org/docs/troubleshooting/ (saved this link for future).

This worked for me after I updated to the latest version of expo-cli.

@RockyStrongo
Copy link

Got the latest version working with instructions here: https://reactnavigation.org/docs/troubleshooting/ (saved this link for future).

Thanks for sharing this page!
running expo start -c fixed the issue for me

@davisgreg1
Copy link

Yes, running expo start -c worked for me.

@UsmanTechJive
Copy link

Today after updating @react-navigation/native and got this error too.
Tried downgrading to @react-navigation/native@5.1.7 = failed
Also tried Troubleshooting steps from https://reactnavigation.org/docs/troubleshooting/ = failed

So in last what I did, go to -> "node_modules@react-navigation\native\src\index.tsx" inside it, delete this line below, and rewrite it again using intellisense.
export { default as NavigationContainer} from './NavigationContainer';

Also run with expo start -c
And this worked for me. I don't even know how it worked but it does.
I hope it helps others too.

@raajnadar
Copy link
Member

I will lock this because we already have a lot of solution for this issue.

@react-navigation react-navigation locked as resolved and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests