question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Real machine commissioning: bundling failed: Error: Unable to resolve module `AccessibilityInfo`

See original GitHub issue

Is this a bug report?

when: in AppDelegate.m

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil];

modified to

jsCodeLocation = [NSURL URLWithString:@“http://192.168.0.101:8081/index.bundle”];

error: error: bundling failed: Error: Unable to resolve module AccessibilityInfo from /Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module does not exist in the module map

It’s normal in the simulator.

Have you read the Contributing Guidelines?

(Write your answer here.)

Environment

In your terminal run react-native info and paste its contents here. Next, specify your target platform, like this:

Environment: OS: macOS High Sierra 0.13.1 Node: 9.4.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 8E3004b

Packages: (wanted => installed)
react-native: 0.52.0 => 0.52.0
react: 16.2.0 => 16.2.0

Target Platform: iOS (11.2)

***Make sure you are on v0.48.0 or greater of react-native, otherwise you may get this error:

Unrecognized command ‘info’ Run react-native --help to see list of all available commands

Steps to Reproduce

(Write your steps here:)

  1. react-native init projectName 2.modified AppDelegate.m
  2. Connection real mobile
  3. start project in xcode
  4. in terminal: error: bundling failed: Error: Unable to resolve module AccessibilityInfo from /Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module does not exist in the 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 $TMPDIR/react-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf $TMPDIR/haste-map-react-native-packager-*. at ModuleResolver.resolveDependency (/Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:311:1719) at ResolutionRequest.resolveDependency (/Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:96:16) at DependencyGraph.resolveDependency (/Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352) at /Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/DeltaBundler/traverseDependencies.js:201:36 at Generator.next (<anonymous>) at step (/Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:306) at /Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:536 at new Promise (<anonymous>) at /Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:217 at addDependency (/Users/kingangelTOT/Application/git_work/node_work/universal/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:92) BUNDLE [dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/4), failed.

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aMarCruzcommented, Apr 15, 2018

Solved! it was this block in the android/build.gradle of one of my libs:

repositories {
    mavenLocal()
    maven {
        url "$rootDir/../node_modules/react-native/android"
    }
    jcenter()
    google()
    maven {
        url 'https://jitpack.io'
    }
}

after changing it to:

  mavenLocal()
  maven {
      url "$rootDir/../node_modules/react-native/android"
  }
  jcenter()
  google()
  maven {
      url 'https://jitpack.io'
  }

all is working again 😄

0reactions
aMarCruzcommented, Apr 15, 2018

I have the same issue in Android.

RN: 0.55.2 buildToolsVersion 27.0.3 compileSDKVersion 26 Linux Mint 18.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

bundling failed - Unable to resolve module `AccessibilityInfo`
I am using react-native 0.63.4, and error is -- error Unable to resolve module AccessibilityInfo` from react-native-calendars/node_modules/react ...
Read more >
Solved: Unable to resolve module AccessibilityInfo
Go to /android/app/src/main/java/com and make sure the location consists of only one directory containing the MainActivity.java and MainApplication.java files.
Read more >
Error: Unable to resolve module `react-native - bundling failed
Error : bundling failed: Error: Unable to resolve module `react-native. I updated all my dependencies to use hooks in React Native. They are:...
Read more >
rows.xml - San Francisco Open Data
The real purpose of the maps is to provide a broad net to help the City identify projects that that may be vulnerable....
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found