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

Move to yarn instead of npm #3838

Closed
cammellos opened this issue Apr 11, 2018 · 5 comments · Fixed by #6928
Closed

Move to yarn instead of npm #3838

cammellos opened this issue Apr 11, 2018 · 5 comments · Fixed by #6928
Labels

Comments

@cammellos
Copy link
Contributor

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__ to inputExcludes in android/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.

@andytudhope
Copy link
Contributor

@dbalatero got quite far with this before getting busy with his own work. Do you have any thoughts?

References:
#2541
#2649

@cammellos
Copy link
Contributor Author

thanks @andytudhope
#2541 is not an issue anymore, as we don't use rn-nodeify anymore I believe
#2649 seems the same issue I believe, only happens on android

@status-im status-im deleted a comment from status-open-bounty Apr 17, 2018
@vitvly vitvly added bounty and removed bounty labels Apr 17, 2018
@status-open-bounty
Copy link

status-open-bounty commented Apr 19, 2018

Current balance: 0.0 ETH
Tokens: SNT: 880.00
Contract address: 0x19de46086225f3e3355c16344a07ef6e886cf95e
QR Code
Network: Mainnet
To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated.
To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

@status-im status-im deleted a comment from status-open-bounty Apr 19, 2018
@rachelhamlin rachelhamlin added this to the Build Status npm Fixes milestone Jun 27, 2018
alwx added a commit that referenced this issue Jul 4, 2018
alwx added a commit that referenced this issue Jul 5, 2018
alwx added a commit that referenced this issue Jul 13, 2018
alwx added a commit that referenced this issue Jul 16, 2018
alwx added a commit that referenced this issue Jul 16, 2018
alwx added a commit that referenced this issue Jul 18, 2018
@jeluard
Copy link
Contributor

jeluard commented Jul 24, 2018

Closing for now as it appears moving to yarn is not practical for us.

@jeluard
Copy link
Contributor

jeluard commented Jul 25, 2018

@alwx Can you share the gist of your findings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants