jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

maximum call stack size exceeded #327

Closed bryanlarsen closed 7 years ago

bryanlarsen commented 7 years ago

node: 0.10.48 npm: 3.10.9 jake: 8.0.15

with a file list of 165 files I get

(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
< repeats very many times >

util.js:35
  var str = String(f).replace(formatRegExp, function(x) {
                      ^
RangeError: Maximum call stack size exceeded

If I do for f incat files.txt; do echo $f ; ./node_modules/.bin/jake $f ; done

everything works fine.

bryanlarsen commented 7 years ago

replacing process.nextTick with setImmediate in lib/task/task.js fixes the problem.

I believe this is also PR #280, although I did the change manually.

welearnednothing commented 7 years ago

Thanks for reporting this, Bryan. For completeness, can you provide a code sample that I can use to replicate this? Thanks!

mde commented 7 years ago

Merged fix from PR #280. Thanks for reporting this!