The project successfully builds locally.
When using Bitbucket pipelines the build gets following error:
+ yarn build:test
yarn run v1.22.19
$ env-cmd -f .env.test npm run build
> telemed-ts@0.1.0 build
> react-scripts build
Creating an optimized production build...
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
I have added memory to the docker container from this thread and got another error:
+ yarn build:test
yarn run v1.22.19
$ env-cmd -f .env.test npm run build
> telemed-ts@0.1.0 build
> react-scripts build
Creating an optimized production build...
/opt/atlassian/pipelines/agent/build/node_modules/react-scripts/scripts/build.js:19
throw err;
^
RpcIpcMessagePortClosedError: Process 147 exited [SIGKILL].
at /opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:19:23
at Generator.next (<anonymous>)
at /opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:8:71
at new Promise (<anonymous>)
at __awaiter (/opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:4:12)
at ChildProcess.handleExit (/opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:18:42)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) {
code: null,
signal: 'SIGKILL'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
But when I build the project on my local machine, yarn build:test works with any problem:
* Executing task: yarn run build:test
yarn run v1.22.19
$ env-cmd -f .env.test npm run build
> telemed-ts@0.1.0 build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
1.23 MB (+3
build/static/js/main.98faeca5.js
1.83 kB build/static/css/main.5de7ade5.css
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
yarn global add serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
Done in 82.20s.
Please help!