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

Builds fail in CI #391

Closed
pasali opened this issue May 3, 2019 · 5 comments
Closed

Builds fail in CI #391

pasali opened this issue May 3, 2019 · 5 comments

Comments

@pasali
Copy link

pasali commented May 3, 2019

We are using CircleCI as CI service and builds keep fails with below exception.
react-app-rewird version= 2.1.3.

ERROR] internal/child_process.js:358
ERROR]     throw errnoException(err, 'spawn');
ERROR]     ^
ERROR]
ERROR] Error: spawn ENOMEM
ERROR]     at ChildProcess.spawn (internal/child_process.js:358:11)
ERROR]     at spawn (child_process.js:533:9)
ERROR]     at Object.fork (child_process.js:108:10)
ERROR]     at fork (/root/cockpit/cockpit-react-client/node_modules/worker-farm/lib/fork.js:17:36)
ERROR]     at Farm.startChild (/root/cockpit/cockpit-react-client/node_modules/worker-farm/lib/farm.js:106:16)
ERROR]     at Farm.processQueue (/root/cockpit/cockpit-react-client/node_modules/worker-farm/lib/farm.js:279:10)
ERROR]     at Farm.<anonymous> (/root/cockpit/cockpit-react-client/node_modules/worker-farm/lib/farm.js:97:21)
ERROR]     at ontimeout (timers.js:436:11)
ERROR]     at tryOnTimeout (timers.js:300:5)
ERROR]     at listOnTimeout (timers.js:263:5)
ERROR]     at Timer.processTimers (timers.js:223:10)
ERROR] npm ERR! code ELIFECYCLE
ERROR] npm ERR! errno 1
ERROR] npm ERR! [email protected] build: `react-app-rewired build`
ERROR] npm ERR! Exit status 1
ERROR] npm ERR!
ERROR] npm ERR! Failed at the [email protected] build script.
ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
ERROR]
ERROR] npm ERR! A complete log of this run can be found in:
ERROR] npm ERR!     /root/.npm/_logs/2019-05-03T07_02_45_427Z-debug.log
@dawnmist
Copy link
Collaborator

dawnmist commented May 3, 2019

This doesn't look like a react-app-rewired issue.

The ENOMEM (Error, No Memory) looks like you're hitting the default node.js memory limit (about 1.7Gb) which is then killing the build. Likely Node.js issue: nodejs/node#25382

Try setting the create-react-app build option --max-old-space-size=8192 to raise the node.js memory limit to 8Gb during build/start/test. i.e.

{
  "scripts": {
    "build": "react-app-rewired --max-old-space-size=8192 build",
    "start": "react-app-rewired --max-old-space-size=8192 start",
    "test": "react-app-rewired --max-old-space-size=8192 test"
  }
}

If that fixes the issue, you'll need to continue to use an increased memory limit for your build. If not, you'll likely need to go through the worker-farm and node.js issues in order to find a work-around/bugfix. As react-app-rewired and react-scripts (the build scripts from create-react-app) do not themselves add the worker-farm library, its use is due to your project's customized build. We won't be able to help further with debugging this without an example repository that demonstrates the issue to be tested.

@pasali
Copy link
Author

pasali commented May 4, 2019

@dawnmist thank for your answer. We have found the problem and working on it to fix. So i am closing this issue since there is no relation with react-app-rewired.

@pasali pasali closed this as completed May 4, 2019
@jordyvandomselaar
Copy link

@pasali Hi, what did you do to fix this? We're running into is as well.

@pasali
Copy link
Author

pasali commented Jan 8, 2020

@jordyvandomselaar the problem was about Terser parallelism. You can disable it either setting
__IS_WSL_TEST__: "true" or you can do it in javascript like

const terseDisableParallel = () => config => {
  config.optimization.minimizer[0].parallel=false;
  return config;
};

@jordyvandomselaar
Copy link

Awesome, thank you for the reply!

JBWatenbergScality added a commit to scality/metalk8s that referenced this issue Mar 30, 2021
In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism

Refs:  timarney/react-app-rewired#391 (comment)
JBWatenbergScality added a commit to scality/metalk8s that referenced this issue Mar 30, 2021
In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism

Refs:  timarney/react-app-rewired#391 (comment)
JBWatenbergScality added a commit to scality/metalk8s that referenced this issue Mar 30, 2021
In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism

Refs:  timarney/react-app-rewired#391 (comment)
JBWatenbergScality added a commit to scality/metalk8s that referenced this issue Mar 30, 2021
In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism

Refs:  timarney/react-app-rewired#391 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants