Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Após o RUN-ANDROID, a tela no emulador possui erros

Boa noite professor, fiz todos os passos corretamente até o momento com o setup do React-Native. Porém, após o comando react-native run-android, consigo alcançar BUILD SUCCESSFUL, porém no emulador aparece uma tela vermelha cheia de erros, com os seguintes dizeres:

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\\gabri\\Desktop\\mobile\\teste\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js","targetModuleName":"AccessibilityInfo","message":"Unable to resolve module `AccessibilityInfo` from `C:\\Users\\gabri\\Desktop\\mobile\\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\\gabri\\Desktop\\mobile\\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\\gabri\\Desktop\\mobile\\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\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ModuleResolution.js:167:1306)\n    at ResolutionRequest.resolveDependency (C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ResolutionRequest.js:80:16)\n    at DependencyGraph.resolveDependency (C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\node-haste\\DependencyGraph.js:237:485)\n    at Object.resolve (C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\lib\\transformHelpers.js:116:25)\n    at dependencies.map.result (C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:298:29)\n    at Array.map (<anonymous>)\n    at resolveDependencies (C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:294:16)\n    at C:\\Users\\gabri\\Desktop\\mobile\\teste\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:159:33\n    at Generator.next (<anonymous>)\n    at step (C:\\Users\\gabri\\Desktop\\mobile\\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:1113
run
    ThreadPoolExecutor.java:588
run
    Thread.java:818

O que seria isso e como resolver para chegar na tela de Hello Word?

3 respostas

Fala Tiago, tudo bem ?

O erro diz que ele não conseguiu encontra o módulo AccessibilityInfo.

Unable to resolve module `AccessibilityInfo`

Você poderia rodar o comando react-native info na pasta do projeto e colocar o conteúdo que ele devolve aqui por favor ? Pra ter mais informações sobre seu ambiente e versões o projeto está levando em conta.

Tente também excluir a pasta node_modules/ e reconstruí-la rodando o comando npm install na pasta do projeto. Depois disso tente subir de novo com react-native start e react-native run-android.

Existe uma Issue registrando justamente esse caso aqui => https://github.com/GeekyAnts/NativeBase-KitchenSink/issues/124

Abraço

solução!

Consegui resolver o problema por hora...estou usando outra versão do React-Native e por enquanto tudo Okay...espero que mantenha isso no decorrer do curso AUshUsUHsuHAsuhas

isso ai infelizmente a versão 0.56 não está funcionando no Windows eu instalei a 0.55.4 e foi.