最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - After installing 'react-navigation' The development server returned response code:500 - Stack Overf

programmeradmin0浏览0评论

I am beginner in react-native and I am getting below error, when I install and try to use react-navigation import {StackNavigator} from 'react-navigation'; I have tried a lot of link to resolve this but didn't find any solution. Below are the links:

Unable to resolve 'react-navigation'

/

Please help me resolve the issue. Thanks in advance.

I am beginner in react-native and I am getting below error, when I install and try to use react-navigation import {StackNavigator} from 'react-navigation'; I have tried a lot of link to resolve this but didn't find any solution. Below are the links:

Unable to resolve 'react-navigation'

https://github./react-munity/react-navigation/issues/1846

https://github./facebook/react-native/issues/4968/

Please help me resolve the issue. Thanks in advance.

Share Improve this question asked Sep 1, 2017 at 7:11 Deepak SachdevaDeepak Sachdeva 1,0109 silver badges18 bronze badges 1
  • Did you try resetting the packager cache? – Kraylog Commented Sep 1, 2017 at 7:53
Add a ment  | 

5 Answers 5

Reset to default 1

Try this Working for me

npm install @react-navigation/native @react-navigation/stack

Import like this

import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';

OR

Please make sure you are not getting any error in your terminal like this

Error: Unable to resolve module `**modules_name**` from `node_modules\

that can be the cause of that.

if you are getting please follow the mand

 npm install modules_name

for every module

Thanks

see Path to react/lib/ReactComponentWithPureRn. It not find path.

I face same problem now.

How to fix

When I look the node modules folder I can't see the react-navigation module.

Then I re-install the module with # npm install --save react-navigation

After restart the bundler with npm start it worked.

i face this problem and fixed it in this way:

According to document we must install all dependencies like :

 react-native-gesture-handler, react-native-reanimated, react-native-screens and react-native-safe-area-context

I was having similar issue. What I found to fixed the issue for me was.

  1. Run code in terminal

    npm i react-navigation-stack

  2. Run the below code by opening terminal in your project directory

    npm install react-navigation-stack @react-native-munity/masked-view react-native-safe-area-context

  3. Lastly running expo clearing the cache(Did this for good measure).

    expo start -c

    Ref: https://www.npmjs./package/react-navigation-stack

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论