-
Notifications
You must be signed in to change notification settings - Fork 987
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
Move to yarn instead of npm #3838
Comments
@dbalatero got quite far with this before getting busy with his own work. Do you have any thoughts? |
thanks @andytudhope |
Current balance: 0.0 ETH |
Closing for now as it appears moving to yarn is not practical for us. |
@alwx Can you share the gist of your findings? |
User Story
As a developer,
I would like to use yarn instead of npm,
because it's faster (in our case) and does not get stuck installing packages
Description
We agreed to move to yarn instead of npm.
We tried to do so but failed as we were not able to build a release in a reasonable amount of time.
Moving to yarn is a trivial code change, but after:
lein prod-build
and
cd android && ./gradlew assembleRelease
it would take a very long time to create the artifact, around 6 hrs on my local machine ( compared to 6 minutes when installing packages through npm).
This has been replicated locally, on docker and on the macos build server.
The steps that fails is
app:bundleReleaseJsAndAssets
.We see
jest-worker
hogging the CPU at 100%, memory consumption is also quite high, once it actually failed because the node engine could not allocate memory.A few scattered thoughts that might help
There are a few issues (some closed) facebook/react-native#11696 which seems to indicate that it's bundling files that it should not be (realm files for example).
Some people mentioned
.babelrc
was the culprit, but did not elaborate any further.What we tried, but did not work
Increase node memory from 4GB to 8GB
Increase gradlew memory from 1GB to 4GB
Add
___tests__
toinputExcludes
inandroid/app/react.gradle
Decrease the number of
jest-workers
Currently we don't have the bandwidth to look into this any further, but if anyone wants to have a go at this it would be helpful.
The text was updated successfully, but these errors were encountered: