Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJS and CallStack Size Protection [duplicate]

This is different to other questions regarding an error message in Node that reads RangeError: Maximum call stack size exceeded in that I know exactly why I'm getting this error message. It's happening because I'm recursing, recursing quite a lot in fact.

Thanks.

like image 899
thomas-peter Avatar asked Sep 25 '26 10:09

thomas-peter


1 Answers

From node --help:

node --max-stack-size=val

Update: as the comments indicate, even though the help text still lists the --max-stack-size option, in node v0.10.x you need to use --stack-size instead.

node --stack-size=val
like image 121
JohnnyHK Avatar answered Sep 27 '26 10:09

JohnnyHK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!