react-native-router-flux: Has `AccessibilityInfo` Error when build ios

Version

Tell us which versions you are using:

  • react-native-router-flux v3.39.1
  • react-native v0.44.2
  • react v16.0.0-alpha.6

Expected behaviour

Build successfully.

Actual behaviour

Go error

error: bundling: UnableToResolveError: Unable to resolve module `AccessibilityInfo` from `/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/Libraries/react-native/react-native-implementation.js`: Module does not exist in the module map or in these directories:
  /Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/node_modules
,   /Users/mshin/Workspace/study/react-native/manager/node_modules

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
    at UnableToResolveError (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:525:5)
    at ResolutionRequest._resolveNodeDependency (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:394:11)
    at tryResolveSync (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:136:20)
    at tryResolveSync (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:66:12)
    at ResolutionRequest.resolveDependency (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:134:22)
    at dependencyNames.map.name (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:145:59)
    at Array.map (native)
    at ResolutionRequest.resolveModuleDependencies (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:145:42)
    at Promise.resolve.then (/Users/mshin/Workspace/study/react-native/manager/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:169:21)
    at process._tickCallback (internal/process/next_tick.js:103:7)
Bundling `index.ios.js`  61.1% (129/165), failed.

Steps to reproduce

  1. Install by yarn add react-native-router-flux
  2. react-native run-ios

Source code

// App.js
import React, { Component } from 'react';
import { View, StatusBar } from 'react-native';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import firebase from 'firebase';
import reducers from './reducers';
import Router from './Router';

class App extends Component {
  componentWillMount() {
    firebase.initializeApp({
      ...
    });
  }
  render() {
    const store = createStore(reducers, {}, applyMiddleware(thunk));
    return (
      <Provider store={store}>
        <View>
          <StatusBar barStyle="dark-content" />
          <Router />
        </View>
      </Provider>
    );
  }
}

export default App;
// Router.js
import React from 'react';
import { Scene, Router } from 'react-native-router-flux';
import LoginForm from './components/LoginForm';

const RouterComponent = () => {
  return (
    <Router>
      <Scene key="login" component={LoginForm} title="Login" />
    </Router>
  );
};

export default RouterComponent;

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 11
  • Comments: 19 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Very same on Android, and it doesn’t let me continue a paid course… Hate when things like this happen.

delete you node_module and npm install then success

Got mine to work some research. Ended up having to downgrade my react-native and use a specific version of RNRF. Delete your node modules folder. Paste the code below into your package.json and npm install everything. Make sure you close your simulator and additional terminal windows.

{
  "name": "manager",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.43.0",
    "react-native-router-flux": "3.38.0",
    "react-redux": "^5.0.4",
    "redux": "^3.6.0",
    "redux-thunk": "^2.2.0",
    "firebase": "^3.9.0"
  },
  "devDependencies": {
    "babel-jest": "20.0.0",
    "babel-preset-react-native": "1.9.1",
    "eslint-config-rallycoding": "^3.2.0",
    "jest": "20.0.0",
    "react-test-renderer": "16.0.0-alpha.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

No it’s probably a react-native-router-flux issue, when i downgraded to version 3.38.0 problem was fixed.

same issue +1