Creating an optimized production build gets stuck

Viewed 827

Trying to do a simple build with Oauth2, getting this error:

./answer build --with github.com/apache/incubator-answer-plugins/connector-basic
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Tried this on both AWS Linux and a fresh Digital Ocean Droplet with latest version of everything.

Trying to run that command returns:

update-browserslist-db: Cannot find package.json. Is this the right directory to run `npx update-browserslist-db` in?

Doing some research yields this as the closest thread:
https://github.com/browserslist/browserslist/issues/663

As a workaround setting BROWSERSLIST_IGNORE_OLD_DATA=true seems to do the trick for now.

However the build process still gets stuck on:

Creating an optimized production build...

At this point it basically gets stuck with top showing:
image.png

Eventually the build fails:

Creating an optimized production build...
/root/apache-answer-1.2.5-incubating-bin-linux-amd64/answer_build3380085711/vendor/github.com/apache/incubator-answer/ui/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_5arfbk4apljaijon4qyerxe7gq/node_modules/react-scripts/scripts/build.js:19
  throw err;
  ^

RpcIpcMessagePortClosedError: Process 27108 exited [SIGKILL].
    at /root/apache-answer-1.2.5-incubating-bin-linux-amd64/answer_build3380085711/vendor/github.com/apache/incubator-answer/ui/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:19:23
    at Generator.next (<anonymous>)
    at /root/apache-answer-1.2.5-incubating-bin-linux-amd64/answer_build3380085711/vendor/github.com/apache/incubator-answer/ui/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/root/apache-answer-1.2.5-incubating-bin-linux-amd64/answer_build3380085711/vendor/github.com/apache/incubator-answer/ui/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:4:12)
    at ChildProcess.handleExit (/root/apache-answer-1.2.5-incubating-bin-linux-amd64/answer_build3380085711/vendor/github.com/apache/incubator-answer/ui/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:18:42)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  code: null,
  signal: 'SIGKILL'
}

Node.js v18.13.0
 ELIFECYCLE  Command failed with exit code 1.
build failed exit status 1root@ubuntu-raw:~/apache-answer-1.2.5-incubating-bin-linux-amd64# 

1 Answers

The issue was memory, 1GB is simply not enough to do this build, once I upgraded to 2GB droplet, the build succeeded.