T
Twenty5mo ago
sani

Error while running the app

This is the error message after few seconds when I do npx nx start, the application runs but thorows this after few seconds only. node:events:492 throw er; // Unhandled 'error' event ^ Error: Worker terminated due to reaching memory limit: JS heap out of memory at new NodeError (node:internal/errors:405:5) at [kOnExit] (node:internal/worker:287:26) at Worker.<computed>.onexit (node:internal/worker:209:20) Emitted 'error' event on Worker instance at: at [kOnExit] (node:internal/worker:287:12) at Worker.<computed>.onexit (node:internal/worker:209:20) { code: 'ERR_WORKER_OUT_OF_MEMORY' } Node.js v18.17.1 System info: Ubuntu, 16 gb ram.
No description
6 Replies
charles
charles5mo ago
Hi @sani, this issue is happening because typescript is quite resource intensive (in term of RAM). How much memory do you have on your setup? 8GB is enough if you disable typescript checker in twenty-front You can remove the checker by editing: packages/twenty-front/vite.config.ts if you have more than 8GB you should be completely fine
sani
saniOP5mo ago
I've 16 gb of ram I checked, it goes up to 14gb of usage and then throws this error
charles
charles5mo ago
to 14GB !? could you run npx nx run twenty-front:start and tell me how much it takes? twenty-front should take around ~4GB without tsc and 5GB with tsc twenty-server should take around ~2GB RAM
sani
saniOP5mo ago
sani
saniOP5mo ago
will probably change the config file for now @charles let me know if theres any solution for this
charles
charles5mo ago
Ok, so you start at 5.7GB and ends up at 13.7GB. It's ~8GB which is ~5.3GB for the FE and ~2GB for the backend. We are working on reducing the FE one but we need to split the project in different packages changing the config file will likely free ~1 or 2 GB if you want to monitor closely, you can start the frontend and the backend separately by running: npx nx run twenty-front:start (resp. twenty-server:start)
Want results from more Discord servers?
Add your server