-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Failed builds when running in CI Environments #4870
Comments
Same problem, on TravisCI > react-scripts build
Creating an optimized production build...
events.js:183
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:364:12)
at PoolWorker.writeJson (/home/travis/build/stadline/project/node_modules/thread-loader/dist/WorkerPool.js:85:22)
at PoolWorker.run (/home/travis/build/stadline/project/node_modules/thread-loader/dist/WorkerPool.js:65:12)
at WorkerPool.distributeJob (/home/travis/build/stadline/project/node_modules/thread-loader/dist/WorkerPool.js:329:20)
at /home/travis/build/stadline/project/node_modules/async/queue.js:10:5
at Object.process (/home/travis/build/stadline/project/node_modules/async/internal/queue.js:175:17)
at /home/travis/build/stadline/project/node_modules/async/internal/queue.js:115:15
at /home/travis/build/stadline/project/node_modules/async/internal/onlyOnce.js:12:16
at callback (/home/travis/build/stadline/project/node_modules/thread-loader/dist/WorkerPool.js:159:21)
at /home/travis/build/stadline/project/node_modules/thread-loader/dist/WorkerPool.js:186:15
at /home/travis/build/stadline/project/node_modules/async/internal/map.js:32:9
at /home/travis/build/stadline/project/node_modules/async/internal/once.js:12:16
at replenish (/home/travis/build/stadline/project/node_modules/async/internal/eachOfLimit.js:61:25)
at iterateeCallback (/home/travis/build/stadline/project/node_modules/async/internal/eachOfLimit.js:50:17)
at /home/travis/build/stadline/project/node_modules/async/internal/onlyOnce.js:12:16
at /home/travis/build/stadline/project/node_modules/async/internal/map.js:29:13
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @app/core@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @app/core@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2018-08-13T14_47_08_752Z-debug.log
{ Error: EPIPE: broken pipe, write errno: -32, code: 'EPIPE', syscall: 'write' } |
I can confirm @alex-pex findings. I Is there a way to optionally configure use of this loader so that I don't have to |
Working with CircleCI support we found this issue: from thread-loader
from CircleCI
Perhaps this value should get set when |
From TravisCI https://docs.travis-ci.com/user/common-build-problems/#my-build-script-is-killed-without-any-error
A suggested fix travis-ci/travis-ci#4696 (comment)
|
thanks @alex-pex and @troyschneringer I had slightly the same problem and fixed it by adding workers: 2 in the webpack.config.prod.js file. I'm on CircleCI and also ejected from CRA with new webpack configuration.
|
@sambegin based on feedback from Circle Support I used the following:
which is the effective number of CPUs available to your build. Minor change, but if you have more resources available it will use the max. |
If anyone is running with create-react-app-rewired I added this config to fix my CI builds module.exports = {
webpack: function(config, env) {
if (process.env.CI) {
const threadLoader = config.module.rules[3].oneOf[1].use[0];
config.module.rules[3].oneOf[1].use[0] = {
loader: threadLoader,
options: {
workers: process.env.CIRCLE_NODE_TOTAL
}
}
}
return config;
}
}; |
Is this being reprioritized? I'm also having the same issues. |
@jedmao checkout 2.0. I updated last week and it resolved this issue. |
threadLoader was removed in 2.0.x, please update if possible or file a new issue if you are still having difficulty. |
I'm not sure if this is the right place for this or not, but I am curious if anyone else is having any issues running their build from within circleci?
I have tried using both
yarn
andnpm
as well as versions1.1.4
and2.0.0-next.3e165448
all of which produce the same error. In all cases I am just running thebuild
targetIs there a way to get more verbose logging on the build so that I can troubleshoot this more?
The error I am seeing is
The text was updated successfully, but these errors were encountered: