Skip to content
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

Build failure for Windows 10 #6224

Closed
kaustavb79 opened this issue Jul 8, 2024 · 11 comments
Closed

Build failure for Windows 10 #6224

kaustavb79 opened this issue Jul 8, 2024 · 11 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@kaustavb79
Copy link

Description

Hi,
I created a react native project using react-native-cli on Windows 10 and add the react-native-reanimated package and follow the instruction mentioned in the README.md file of the package. When I tried to install app on android emulator using the following command npx react-native run-android the build got stuck at react-native-reanimated and after 10-15 min it gave build failure error. Below I have pasted the build error screenshots. I have created a dummy project with the exact same package version as my origin app for testing and the app gets build successfully. Shared the repo link too.

Screenshot (18)
Screenshot (10)
Screenshot (11)
Screenshot (12)
Screenshot (13)
Screenshot (14)
Screenshot (15)

Screenshot (16)
Screenshot (17)

Operating System

Windows 10

CMake

Version: 3.29.6

NodeJS

Version: 2.15.0

npm

Version: 10.7.0

yarn

Version: 1.22.22

Android SDK

Version: 14 (UpsideDownCake) ---- Level : 34

Watchman

Version: 20240616.093132.0

Steps to reproduce

1 Open Android Studio
2. Create a virtual device with Android 14 (Level : 34)
3. Run the device
4. Pull the dev branch from t he git repo provided.
5. cd Reactnativeproj1
6. npm install
7. npx react-native run-android

Snack or a link to a repository

https://github.com/kaustavb79/Reactnativeproj1.git

Reanimated version

3.12.1

React Native version

0.74.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

None

Device

Android emulator

Device model

Pixel 8 --- Android 14

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snippet of code, snack or repo is provided Platform: Android This issue is specific to Android labels Jul 8, 2024
@szydlovsky
Copy link
Contributor

@kaustavb79 you have no babel plugin in your repo. I recommend visiting installation guide and adding it. Let me know if it helps

@szydlovsky szydlovsky added the Close when stale This issue is going to be closed when there is no activity for a while label Jul 8, 2024
@kaustavb79
Copy link
Author

Check the dev branch. It's the updated one.

https://github.com/kaustavb79/Reactnativeproj1/blob/dev/babel.config.js

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jul 8, 2024
@kaustavb79
Copy link
Author

Check the dev branch. It's the updated one.

https://github.com/kaustavb79/Reactnativeproj1/blob/dev/babel.config.js

This is working in Ubuntu 20.04 LTS and also in Mac but not in Windows 10.

@szydlovsky
Copy link
Contributor

@kaustavb79 okay, what is your NDK version? When searching for similar issues (and we have had a bunch of them already - it doesn't hurt to search:) ) I found that it often comes down to wrong version. See for example this

@MatiPl01
Copy link
Member

MatiPl01 commented Jul 8, 2024

@kaustavb79 It might be also related to the path length limit issue. See this comment with links to proposed solutions and check if some of these work for you.

@kaustavb79
Copy link
Author

@kaustavb79 okay, what is your NDK version? When searching for similar issues (and we have had a bunch of them already - it doesn't hurt to search:) ) I found that it often comes down to wrong version. See for example this

NDK version is 26.1.10909125

@kaustavb79
Copy link
Author

@kaustavb79 It might be also related to the path length limit issue. See this comment with links to proposed solutions and check if some of these work for you.

Is there a way to update the path limit?

@MatiPl01
Copy link
Member

MatiPl01 commented Jul 9, 2024

@kaustavb79 It might be also related to the path length limit issue. See this comment with links to proposed solutions and check if some of these work for you.

Is there a way to update the path limit?

You can try this and see if it works. Alternatively, just try to move your project to the shortest possible path (e.g. temporarily just store it in the root directory of your drive).

If it doesn't work for you, maybe try this one.

@kaustavb79
Copy link
Author

I checked the file path length and its 78 and default max length limit set by default is 260 characters.
I moved it to C:\Users\msi-kb but it still gave the same error.
ninja.exe is not getting installed. It disappears after opening a blank command prompt for 3-4 seconds.

@kaustavb79
Copy link
Author

It worked.
Enabled the Win32 long path flag from registry by following the steps from below link.

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

@MatiPl01
Copy link
Member

It worked. Enabled the Win32 long path flag from registry by following the steps from below link.

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

I'm glad that you were able to fix the issue. Thank you for letting us know how you solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants