question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed builds when running in CI Environments

See original GitHub issue

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 and npm as well as versions 1.1.4 and 2.0.0-next.3e165448 all of which produce the same error. In all cases I am just running the build target

Is there a way to get more verbose logging on the build so that I can troubleshoot this more?

The error I am seeing is

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/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:89:22)
    at PoolWorker.run (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:69:12)
    at WorkerPool.distributeJob (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:326:20)
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/queue.js:10:5
    at Object.process (/home/circleci/project/node_modules/thread-loader/node_modules/async/internal/queue.js:175:17)
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/queue.js:115:15
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
    at callback (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:163:21)
    at /home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:190:15
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/map.js:32:9
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/once.js:12:16
    at replenish (/home/circleci/project/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:61:25)
    at iterateeCallback (/home/circleci/project/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:50:17)
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
    at /home/circleci/project/node_modules/thread-loader/node_modules/async/internal/map.js:29:13
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
{ Error: EPIPE: broken pipe, write errno: -32, code: 'EPIPE', syscall: 'write' }
{ Error: EPIPE: broken pipe, write errno: -32, code: 'EPIPE', syscall: 'write' }
ERROR: "build-js" exited with 1.
{ Error: EPIPE: broken pipe, write errno: -32, code: 'EPIPE', syscall: 'write' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
{ Error: EPIPE: broken pipe, write errno: -32, code: 'EPIPE', syscall: 'write' }
Exited with code 1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:11

github_iconTop GitHub Comments

4reactions
kevinhughes27commented, Aug 24, 2018

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;
  }
 };
1reaction
troyschneringercommented, Aug 15, 2018

@sambegin based on feedback from Circle Support I used the following:

workers: process.env.CIRCLE_NODE_TOTAL

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify and fix broken builds with CI/CD pipelines | TechTarget
Automated tests can cause intermittent broken builds. To check for this, access reports that offer more information on why the test is failing....
Read more >
Troubleshooting Continuous Integration, or How to Debug ...
Troubleshooting Continuous Integration, or How to Debug Tests That Fail on CI, but Pass Locally · Don't Relaunch the CI Build · Rebase...
Read more >
Reduce CI failures with unified dev and build environments
Containerize your dev and build workflows to share dependencies and reduce configuration drift across environments.
Read more >
3 Steps to Eradicate Flaky CI Builds - Semaphore
Unreliable builds hurt every developer. First, there's the obvious: time spent re-running and debugging flaky builds is time lost for other ...
Read more >
Troubleshooting CI/CD - GitLab Docs
Jobs or pipelines don't run when expected · Pipeline with many jobs fails to start · A job runs unexpectedly · “fatal: reference...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found