You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
android build fails at generateCodegenArtifactsFromSchema step: ENOENT: no such file or directory, lstat 'android' #36286
Running yarn react-native run-android fails with this error. Removing react-native-gesture-handler results in the next dependency to fail.
> Task :react-native-gesture-handler:generateCodegenSchemaFromJavaScript FAILED
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, lstat 'android'
at Object.lstatSync (node:fs:1574:3)
at /Users/colin/Documents/project/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:75:10
running ./gradlew generateCodegenArtifactsFromSchema in android folder also fails with the same message.
React Native Version
0.71.3
Output of npx react-native info
System:
OS: macOS 13.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.42 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.6.0 - /var/folders/sj/lr7ybqnx3vs0rn7xc9g_34h00000gn/T/yarn--1677247283616-0.8451485942008805/node
Yarn: 1.22.19 - /var/folders/sj/lr7ybqnx3vs0rn7xc9g_34h00000gn/T/yarn--1677247283616-0.8451485942008805/yarn
npm: 8.16.0 - ~/.nvm/versions/node/v18.6.0/bin/npm
Watchman: 2023.01.16.00 - /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /Users/colin/.sdkman/candidates/java/current/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: ^0.71.3 => 0.71.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
I am not sure, maybe I am missing something but the steps should be creating a an app w/ react native 0.70 add react-native-gesture-handler (or any other native dependency) and upgrade to 0.71.
Snack, code example, screenshot, or link to a repository
in my app/build.gradle the react { } block is empty.
@cortinico Thanks for the reply!
If I remove react-native-gesture-handler the issue occurs for react-native-screens. I think react-native-gesture-handler is not the problem here but I will open an issue there 👍
If I remove react-native-gesture-handler the issue occurs for react-native-screens. I think react-native-gesture-handler is not the problem here but I will open an issue there 👍
Can you then create a sample repo with the new app template + a single library where this issue reproduces?
Thanks for your effort @j-piasecki ! I was able to fix my issue. I had react-native-codegen as a dependency in my package.json and probably the version was not the right one. After removing it, it worked 🎉
Activity
cortinico commentedon Feb 24, 2023
Can you report this to
react-native-gesture-handlerhere?https://github.com/software-mansion/react-native-gesture-handler/issues.
I'll close this for now as I believe it's a bug in their integration, but please reopen this one if they get back with a bug inside React Native core.
buschco commentedon Feb 24, 2023
@cortinico Thanks for the reply!
If I remove
react-native-gesture-handlerthe issue occurs forreact-native-screens. I thinkreact-native-gesture-handleris not the problem here but I will open an issue there 👍cortinico commentedon Feb 24, 2023
Can you then create a sample repo with the new app template + a single library where this issue reproduces?
j-piasecki commentedon Feb 27, 2023
@buschco I wasn't able to reproduce it on my own, the repository with a reproduction would be greatly appreciated.
buschco commentedon Feb 27, 2023
Thanks for your effort @j-piasecki ! I was able to fix my issue. I had
react-native-codegenas a dependency in mypackage.jsonand probably the version was not the right one. After removing it, it worked 🎉