latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
725 stars 183 forks source link

[bug] unable to build historical indexer #2801

Closed joergkiesewetter closed 4 months ago

joergkiesewetter commented 5 months ago

Hi,

I'm trying to build the docker image from the historical indexer branch, but it fails. The error message is:

193.5 packages/store-sync build: node:events:495
193.5 packages/store-sync build:       throw er; // Unhandled 'error' event
193.5 packages/store-sync build:       ^
193.5 packages/store-sync build: Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
193.5 packages/store-sync build:     at new NodeError (node:internal/errors:405:5)
193.5 packages/store-sync build:     at [kOnExit] (node:internal/worker:301:26)
193.5 packages/store-sync build:     at Worker.<computed>.onexit (node:internal/worker:222:20)
193.5 packages/store-sync build: Emitted 'error' event on Worker instance at:
193.5 packages/store-sync build:     at [kOnExit] (node:internal/worker:301:12)
193.5 packages/store-sync build:     at Worker.<computed>.onexit (node:internal/worker:222:20) {
193.5 packages/store-sync build:   code: 'ERR_WORKER_OUT_OF_MEMORY'
193.5 packages/store-sync build: }
193.5 packages/store-sync build: Node.js v18.20.2
193.6 packages/store-sync build:  ELIFECYCLE  Command failed with exit code 1.
193.6 packages/store-sync build: Failed
193.6 /app/packages/store-sync:
193.6  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @latticexyz/store-sync@2.0.4 build: `pnpm run build:js`
193.6 Exit status 1

It seems like the node process in the docker image doesn't have enough memory to build the store-sync package. To solve this, the memory limit within docker needs to be changed. I will open a PR to solve this.