Real machine commissioning: bundling failed: Error: Unable to resolve module `AccessibilityInfo`
See original GitHub issueIs 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:)
- react-native init projectName 2.modified AppDelegate.m
- Connection real mobile
- start project in xcode
- 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:
- Clear watchman watches:
watchman watch-del-all
. - Delete the
node_modules
folder:rm -rf node_modules && npm install
. - Reset Metro Bundler cache:
rm -rf $TMPDIR/react-*
ornpm 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:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Solved! it was this block in the android/build.gradle of one of my libs:
after changing it to:
all is working again 😄
I have the same issue in Android.
RN: 0.55.2 buildToolsVersion 27.0.3 compileSDKVersion 26 Linux Mint 18.3