Unable to resolve module `AccessibilityInfo`
See original GitHub issueI thoroughly followed the instructions at https://facebook.github.io/react-native/docs/getting-started , Building Projects with Native Code , Development OS: Windows , Target: Android
After typing react-native run-android in the command prompt. A node command appears and I see this error:
Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `AccessibilityInfo` from `C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\react-native\Libraries\react-native\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map
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 Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
at ModuleResolver.resolveDependency (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:167:1306)
at ResolutionRequest.resolveDependency (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:80:16)
at DependencyGraph.resolveDependency (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\node-haste\DependencyGraph.js:237:485)
at Object.resolve (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\lib\transformHelpers.js:116:25)
at dependencies.map.result (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:298:29)
at Array.map (<anonymous>)
at resolveDependencies (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:294:16)
at C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:159:33
at Generator.next (<anonymous>)
at step (C:\Users\Brad Baguyo\Desktop\AwesomeProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:239:307)
BUNDLE [android, dev] ..\..\../index.js ░░░░░░░░░░░░░░░░ 1.2% (2/19), failed.
npm ls react-native-scripts: -- (empty)
npm ls react-native: react-native@0.56.0
npm ls expo: -- (empty)
node -v: v10.8.0
npm -v: 6.2.0
yarn --version: 'yarn' is not recognized as an internal or external command, operable program or batch file.
watchman version: 'watchman' is not recognized as an internal or external command, operable program or batch file.
Operating system: Windows 10
Phone/emulator/simulator & version: Nexus 5x API 23 ,
Resolution: 1080 x 1920: 420dpi,
API: 23 , Android 6.0 (Google APIs),
CPU/ABI: x86_64,
Size on Disk: 3.3GB
The android emulator also says : “The development server returned response error code:500”
Please help me. If you need more information, I will be happy to provide it.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
Unable to resolve module 'AccessibilityInfo', when trying to ...
It seems like a bug in 0.56 related to dependencies. The "solution" is to find the correct combination of dependencies' versions.
Read more >Issue - GitHub
Unable to resolve module ./Libraries/Components/AccessibilityInfo/AccessibilityInfo from node_modules/react-native/index.js : None of these ...
Read more >Solved: Unable to resolve module AccessibilityInfo
This error is due to the version of react-native used. Most likely, you are using react-native 0.56.0, which has this bug. Your react...
Read more >Unable to resolve module `AccessibilityInfo`
I am trying to create a new React-Native project from WebStorm IDE. After I run 'npm install' and click on 'Run' button in...
Read more >Unable to resolve module `AccessibilityInfo`-React Native
Coding example for the question React Native: bundling failed - Unable to resolve module `AccessibilityInfo`-React Native.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have resolved my probles.
Edited package.json
Finally I find the solution! I’m downgrading react-native from 0.56.0 --> 0.55.4
So open the file of your project named as “package.json” inside it you can find react-native": “0.56.0” replace this version with react-native": “0.55.4” and downgrade “babel-preset-react-native” from 5.x to “4.0.0” –> Save the file. open CMD (command line), reach to the your project directory and run the command: npm install continue, run the command: npm i @babel/core finally, run your project: react-native run-android.
This worked for me. Hope this help you.