I'm running into the following error in my GruntJS script:
Maximum call stack size exceeded"
What's the proper syntax for invoking the node flag --max-stack-size=
in my grunt command so I can set aside a larger amount of memory for the stack?
Unless you are doing some very high-level programming in GruntJS I think you may have a cyclic task registered.
If you name a task the same name as plugin it will run an infinite amount of times:
grunt.registerTask('uglify', ['uglify'])
This results in the task calling itself.
In order to verify what you're doing, run the grunt with --verbose
(or --v) command to see what grunt is running.
For instance run grunt uglify --v
and notice how many times it runs. This can be fixed easily by changing the task name to something else.
If however you're sure of what you're doing run grunt with --max-stack-size=10000
or whatever...
Install grunt-cli
locally with npm install grunt-cli
then call it locally with:
node --max-stack-size=val ./node_modules/.bin/grunt
Although likely you're getting that error because of an infinite recursion that should be fixed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With