I have tsc
job failing on gitlab ci with
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
The script I'm running is
tsc -p test/tsconfig.json --noEmit
What I've tried so far is to increase max-old-space-size
via:
cross-env NODE_OPTIONS=--max-old-space-size=8192 yarn print:heapsize && tsc -p test/tsconfig.json --noEmit
cross-env NODE_OPTIONS='--max-old-space-size=8192' yarn print:heapsize && tsc -p test/tsconfig.json --noEmit
(just extra quotes around var)node --max-old-space-size=8192 ./node_modules/.bin/tsc -p test/tsconfig.json --noEmit
Options #1 and #2 doesn't work, and #3 works fine, but it doesn't sound okay to me to run the binary and pass param to the node cli
So my question is - how do I set max-old-spce-size
for tsc
via env variables
or maybe there is another good way to do it?
yarn print:heapsize
is the script I used to check current size - it shows 8gb for both #1 and #2 here it is:
"print:heapsize": "node -e \"console.log('