Running webpack serve on multiple ports within pipeline

Tamsin May 10, 2023

I have a react app, which has been build using micro frontends. I am trying to run cypress tests as part of a bitbucket pipeline, but I can't get my app to run within the pipeline.  To start the app I use lerna, which in turn starts each micro frontend using webpack, on a different port. So basically runs the command below but with different ports

webpack serve  --port 8505

It works fine locally, but in the pipeline I get errors like this:

node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);


RpcIpcMessagePortClosedError: Cannot send the message
- the message port has been closed for the process 1149.


at /opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: undefined,
signal: undefined
}

 

I wonder if there is something I need to know about using `webpack serve` within the pipeline environment? My pipeline which builds and deploys using webpack works fine, so it must be something specific to serve? Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Tamsin May 11, 2023

To answer my own question - the build container was running out of memory. I reduced the memory used by the docker and mysql services, and added size: 2x to the build step

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events