React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 827.14 MB / 7.90 GB
Binaries:
Yarn: 1.9.2 - C:\Users\Lucas\AppData\Roaming\npm\yarn.CMD
npm: 6.2.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4697961
I was trying to build and run my first react-native project on an AVD running android-studio AVD, have emulated a device and, when I did react-native run-android, it started to compiled the code. Something happened at the AVD and I got the following error:
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false
Body:
{"originModulePath":"C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js","targetModuleName":"AccessibilityInfo","message":"Unable to resolve module `AccessibilityInfo` from `C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 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-*`.","errors":[{"description":"Unable to resolve module `AccessibilityInfo` from `C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 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-*`."}],"name":"Error","stack":"Error: Unable to resolve module `AccessibilityInfo` from `C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 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-*`.\n at ModuleResolver.resolveDependency (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ModuleResolution.js:167:1306)\n at ResolutionRequest.resolveDependency (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ResolutionRequest.js:80:16)\n at DependencyGraph.resolveDependency (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph.js:237:485)\n at Object.resolve (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\lib\\transformHelpers.js:116:25)\n at dependencies.map.result (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:298:29)\n at Array.map (<anonymous>)\n at resolveDependencies (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:294:16)\n at C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:159:33\n at Generator.next (<anonymous>)\n at step (C:\\Users\\Lucas\\Desktop\\testes\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:239:307)"}
processBundleResult
BundleDownloader.java:285
access$200
BundleDownloader.java:37
onResponse
BundleDownloader.java:163
execute
RealCall.java:153
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1167
run
ThreadPoolExecutor.java:641
run
Thread.java:764
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
cd C:\Users\[Your_username]\Desktop
mkdir testes
cd testes
react-native init teste
cd teste
[now, run a virtual device on Android Studio]
react-native run-android
[the error will appear on AVD screen
I tryied to run the code on my own Android phone, and got the very same error.
I tryied to run the suggestions listed on the error, but for all of the command on the steps, I've got that "watchman isn't recognized as an internal command or external, an operable program
Duplicate of #14209
This issue have been opened, yes is a duplicate of #14209 but #14209 for some reason have been CLOSED, which is odd, the issue remains very relevant at this point in time the latest React-Native cannot run-android on a simulator.
Use 0.55.4 version instead. 0.56 is not working on windows.
This means that the issue should remain open for 0.56, as it is broken on windows for 0.56. Why are you closing this issue as duplicate?
It is very easy to reproduce:
yes, it's very easy to reproduce. But the issue happens not only on android simulator: it happened also on my own android mobile
@jeroentrappers I don't. I just mention the original issue where you can find all the solutions to deal with that problem. I am agree with you that original topic should be open not closed.
Well, there's something wrong with react-native 0.56 . I tried to use version 0.55.4 and it worked really fine! Thanks @jeroentrappers and @Tchanu .
And I agree that one of the issues (mine or the one which has been closed) must remain open, for people to discuss about it and try to solve. Because it makes no sense to have a later version, but not be able to use
Did you try react-native start -- --reset-cache ?
To be honest, I don't remember. Because I'm not an expert on react native (actually I know nothing, I've just started to study it), and I did so many things trying to solve it that I lost myself on what I did and what I didn't do. The thing is: 0.55.4 works fine. 0.56 don't.
same problem... from what im reading, no one resolve this issue with 0.56...
I think this issue is the original one and they are working on it #19953
I have the same issue, I also tried to fixed it and removed node_modules folder, then changed the version of react-native from 0.56.0 to 0.55.4 and nothing changed, I have the same error
any solution?
@hadjloo I just revert my project to the previous version (0.55.2 mine), and its ok everything, dont forget to close the emulator and open again if you revert to your version. They want to release 0.57 with this issue fixed. Look here, https://github.com/facebook/react-native/issues/19953
@PrsRares Thanks for the hint, I downgraded to 0.55.2, reset my emulator. and yet I have same error
I wish they fix it in 0.57
in the meantime, can you please upload your package.json here, so that I see if I have another issue or not?
Thank you
I think you should close everything, delete node_modules, npm install, reset cache(npm cache clear --force, react-native start -- --reset-cache, i tryed both),and try after to open,thats the whole process i did and it worked. Here is package.json:
"dependencies": {
"babel-plugin-ramda-patch": "1.1.6",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"hmacsha1": "^1.0.0",
"lodash": "^4.17.10",
"lodash.isequal": "^4.5.0",
"mobx": "^4.3.1",
"mobx-react": "^5.2.3",
"moment": "^2.22.2",
"npm": "^6.1.0",
"prop-types": "^15.6.2",
"ramda": "^0.22.1",
"react": "16.3.1",
"react-native": "0.55.2",
"react-native-auto-height-image": "^1.0.0",
"react-native-calendars": "^1.19.4",
"react-native-firebase": "^4.2.0",
"react-native-image-pan-zoom": "^2.1.7",
"react-native-image-picker": "^0.26.10",
"react-native-linear-gradient": "^2.4.0",
"react-native-render-html": "^3.10.0",
"react-native-splash-screen": "3.0.6",
"react-native-star-rating": "^1.0.9",
"react-native-swiper": "^1.5.13",
"react-navigation": "^2.4.1"
},
"devDependencies": {
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-react-native": "4.0.0",
"react-test-renderer": "16.2.0"
},
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
}
I hope it helps
@PrsRares Thank you bro. Unfortunately, using this package.json, couldn't help me. I guess I ahve to wait for react-native 0.57
@hadjloo Have you tried creating a new project? react-native init --version="0.55.4" MyNewApp
Don't forget to clear React Native cache. del %appdata%\Temp\react-native-*
@Tchanu When I do this I got this error
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Failed to find Build Tools revision 23.0.1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 18.341 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
@Tchanu Thank dude, It helped a lot. it fixed my problem for now.
Yet I'm waiting for react-native 0.57.0 to start my main project
Duplicate of #19953
Most helpful comment
yes, it's very easy to reproduce. But the issue happens not only on android simulator: it happened also on my own android mobile