1
resposta

estou com um problema ao executar o npx react-native run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. node:internal/fs/utils:344 throw err; ^

Error: ENOENT: no such file or directory, scandir 'node_modules' at readdirSync (node:fs:1390:3) at readDir (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/node_modules/jetifier/src/utils.js:14:17) at Object. (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/node_modules/jetifier/index.js:12:15) at Module.compile (node:internal/modules/cjs/loader:1101:14) at Object.Module.extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module.load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/nodemodules/jetifier/bin/jetify:3:1) { errno: -2, syscall: 'scandir', code: 'ENOENT', path: 'node_modules' } error Failed to run jetifier. Error: Command failed: /home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/node_modules/jetifier/bin/jetify at makeError (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/nodemodules/@react-native-community/cli-platform-android/nodemodules/execa/index.js:174:9) at /home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/nodemodules/@react-native-community/cli-platform-android/nodemodules/execa/index.js:278:16 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.runAndroid [as func] (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/nodemodules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:104:7) at async Command.handleAction (/home/vainaweb/Documentos/curso-basico-react-native/orgsHooks/nodemodules/@react-native-community/cli/build/index.js:192:9)

1 resposta

Não sei se seria o caso, mas primeiro eu tentaria apagar a pasta node modules, depois rodar

npm install

e depois o

npx react-native run-android