[DOCS] Error Workaround twenty-server start on WSL - JavaScript heap out of memory (#15047)

This PR updates the troubleshooting documentation to address Javascript
heap out of memory error during first start of the twenty-server. Here's
a summary of the key changes:

- Added new workaround in troubleshooting.mdx addressing heap out of
memory error during twenty-server:start on WSL
This commit is contained in:
PurvaP
2025-10-22 10:43:02 +02:00
committed by GitHub
parent c8fe805ea5
commit c2a477a9d6
@@ -72,6 +72,18 @@ In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true`
**If it does not work:**
Run only the services you need, instead of `npx nx start`. For instance, if you work on the server, run only `npx nx worker twenty-server`
**If it does not work:**
If you tried to run only `npx nx run twenty-server:start` on WSL and it's failing with the below memory error:
`FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`
Workaround is to execute below command in terminal or add it in .bashrc profile to get setup automatically:
`export NODE_OPTIONS="--max-old-space-size=8192"`
The --max-old-space-size=8192 flag sets an upper limit of 8GB for the Node.js heap; usage scales with application demand.
Reference: https://stackoverflow.com/questions/56982005/where-do-i-set-node-options-max-old-space-size-2048
**If it does not work:**
Investigate which processes are taking you most of your machine RAM. At Twenty, we noticed that some VScode extensions were taking a lot of RAM so we temporarily disable them.