Daniel
Daniel

Reputation: 11

React Native Development Server Error 500

Hey I'm trying to make my first app in react-native and I am running into an issue after trying to install react-navigation and react-navigation stack.

When i try to run react-native start I get this error:

 BUNDLE  [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 57.2% (431/570)::ffff:127.0.0.1 - - [19/Feb/2020:23:06:17 +0000] "GET /index.bundle?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"
error: bundling failed: Error: Unable to resolve module `@react-native-community/masked-view` from `node_modules/react-navigation-stack/lib/module/vendor/views/MaskedView.native.js`: @react-native-community/masked-view could not be found within the project.

but I have react-native-community in my node modules folder and have tried installing it again but it doesn't seem to exist when i do npm install react-native-community.

Also I'm not sure if this is related but when i do react-native run-android It gets stuck at 99% now on the app:installDebug step.

Edit: Fixed needed to do npm install @react-native-community/masked-view

Error on emulator

Upvotes: 1

Views: 6433

Answers (4)

Keith
Keith

Reputation: 77

If you are getting this error

Unable to resolve "@react-native-community/masked-view" from "node_modules\react-navigation-stack\lib\module\vendor\views\MaskedView.native.js

Run npm install @react-native-community/masked-view

Upvotes: 0

DIKHIT BHUYAN
DIKHIT BHUYAN

Reputation: 121

install this in your project

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

https://reactnavigation.org/docs/getting-started

Upvotes: 12

Asad
Asad

Reputation: 573

"@react-native-community/masked-view" this dependence making error. I think so your using react-native-navigation which is making issue because in latest react-native(Version> 0.60) this issues is occurring, but Version<0.60 lower than, working fine. So please down grade your react-native version after that this issue will be resolved.

Upvotes: 1

web_walkerX
web_walkerX

Reputation: 880

Run npm list in your working folder to see all dependencies in your project folder and look out for UNMET PEER DEPENDENCY, then install all dependencies that are unmet

Upvotes: 2

Related Questions