New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Expo 42] Bare app build failing #13475
Comments
I'm also having an issue. I think I might be onto a fix though... Can you run |
@tomhicks it is stated above too, but its the LTS 14.17.1 |
oh yep I missed that...🙉 Are there any more details on the build failure? I was having an issue specifically with |
Sorry for the delay, I'm getting the exact same error as you, could the reason be that I've installed node via choco?
I'll try changing node |
Can you run |
got this
|
I can kind of see your issue:
That's somehow preventing the autolinking from working. It's different from my issue, which was that the autolinking code uses nullish coalescing Yours looks like possibly some ruby issue but that's a bit of an unhelpful guess. |
I had the same problem and upgrading the node version to 14 resolved the issue. Thanks! |
I knew this was happening. Solved it one hour after updating my unimodules. Tried to make a pull request, but too much burocracy. at node_modules/@unimodules/react-native-adapter/scripts/autolinking.gradle , at line 97:
switch the quotes like this:
I've also made the changes mentioned in this commit about the unimodules implementation, but I don't know if this is needed for it to build, since I've found out the solution above later: [ios][android] New autolinking implementation in TypeScript (#11593) I guess it is the undocumented "new way" to implement unimodules? |
well, when i changed OSes and tried jus now, it worked, maybe It got fixed in the meantime? |
This is still a problem for windows users, at least. |
I thought about it after closing, sorry, I'll leave it open, until the problem is fixed. |
It works in Windows after making the change: I also tested it in a React Native CLI app with react-native-unimodules. |
Changin to |
@Albermonte you could use something like patch-package I think. |
Hey all! I'm sorry for this issue and I can confirm this happens on Windows. I created a patch to fix this, I hope we can roll this out asap. If you absolutely need this to work, including on CI, you can work with You'll need to create a file in diff --git a/node_modules/@unimodules/react-native-adapter/scripts/autolinking.gradle b/node_modules/@unimodules/react-native-adapter/scripts/autolinking.gradle
index aedcef3..1e5903e 100644
--- a/node_modules/@unimodules/react-native-adapter/scripts/autolinking.gradle
+++ b/node_modules/@unimodules/react-native-adapter/scripts/autolinking.gradle
@@ -94,7 +94,7 @@ class ExpoAutolinkingManager {
String[] args = [
'node',
'--eval',
- 'require("expo-modules-autolinking")(process.argv.slice(1))',
+ 'require(\'expo-modules-autolinking\')(process.argv.slice(1))',
'--',
command,
'--platform',
Here is a short guide to set that up:
If you commit the patch and changes in your Hope this helps! |
Hi! Thanks for the fix 💯 When do you plan to do the release fix to react-native-unimodules? |
We are running into some complications, we will take a closer look at this part tomorrow and will release asap. When the fix is released, I'll post here again with the version that includes this. |
Patch has been released! Please use
It should be installed automatically, but if it doesn't make sure to regenerate your lockfile. |
Still having an issue
Developing works nice and builds but as soon as I try to build using AppCenter it fails |
Make sure to clean your cache, not only yarn or npm's cache but also the gradle cache. To double-check the fix, I created this repository that contains two workflows. It creates a new project on the fly, changes the |
I still ran into error when trying a similar workflow on a local MacOS machine /.gradlew assembleDebug
Steps I followed:
yarn why @unimodules/react-native-adapter
Machine info
|
I can confirm that it's still a problem. Similar configuration as @kalvin807
Update: Tried it now on another Mac, cloned the project anew and the build fails with the same error. |
I think something is up with the dependencies in your project here. This error is slightly different from the original one and is not related to the fix we just sent out.
If you are using SDK 42, and have upgraded from an older version, you can try running Edit: As someone else pointed out, also make sure to run Node 14 (the current LTS) or higher (using even numbers) Hope this helps! |
Running My yarn.lock file:
Manually changing those to "@unimodules/react-native-adapter" "~6.3.2" does nothing, build still fails on AppCenter CI |
I finally made it work by the following steps, it will help anyone who come across this. Thanks for everyone advice!
|
Unfortunately, its still failing. Getting this below error. |
Hi all, due to a mix of different underlying causes resulting in similar errors we are going to lock this thread. The error you will encounter for any of the underlying causes described below might look like this (comment):
Steps to fix it
Known causesThese are some of the known underlying issues which are causing the error above.
Still running into issues?If you tried everything from the steps to fix, and your issue isn't related to the underlying causes, please open a new issue. |
All of the issues that @byCedric summarized perfectly above are fixed in react-native-unimodules@0.14.5 and its dependency @unimodules/react-native-adapter@6.3.4. These versions include the fixes from the pull requests that he referenced. |
Edit Due to a mix of different underlying causes, we have locked this issue. Please read through this comment to find out how you can resolve this issue.
Summary
Android app fails to build on
Task :unimodules-react-native-adapter:compileDebugJavaWithJavac
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
No response
Environment
Expo CLI 4.7.2 environment info:
System:
OS: Windows 10 10.0.19043
Binaries:
Node: 14.17.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 26, 29, 30
Build Tools: 29.0.2, 30.0.3
System Images: android-28 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-S | Google Play Intel x86 Atom_64
IDEs:
Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7351085
npmPackages:
expo: ~42.0.0 => 42.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
Initialize a new Expo Bare App
Setup typescript (only creating the tsconfig.json and installing the deps when prompted by
expo start
)Add eslint (config universe/native and the plugin simple-import-sort)
Try to
yarn android
and it shoud fail on the task mentioned aboveThe text was updated successfully, but these errors were encountered: