ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

Maximum call stack size exceeded #79

Closed adius closed 9 years ago

adius commented 9 years ago

On about every 2-5 reloads the server crashes with following error message:

(null):0
(null)

RangeError: Maximum call stack size exceeded

npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.6
npm ERR! code ELIFECYCLE
npm ERR! Lowfab@0.6.0 start: `cake start`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the Lowfab@0.6.0 start script 'cake start'.
npm ERR! This is most likely a problem with the Lowfab package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cake start
npm ERR! You can get their info via:
npm ERR!     npm owner ls Lowfab
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/adrian/Projects/lowfab/npm-debug.log

The npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using npm@2.7.6
3 info using node@v0.12.2
4 verbose node symlink /usr/local/bin/node
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart Lowfab@0.6.0
7 info start Lowfab@0.6.0
8 verbose unsafe-perm in lifecycle true
9 info Lowfab@0.6.0 Failed to exec start script
10 verbose stack Error: Lowfab@0.6.0 start: `cake start`
10 verbose stack Exit status 7
10 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
10 verbose stack     at EventEmitter.emit (events.js:110:17)
10 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
10 verbose stack     at ChildProcess.emit (events.js:110:17)
10 verbose stack     at maybeClose (child_process.js:1015:16)
10 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid Lowfab@0.6.0
12 verbose cwd /Users/adrian/Projects/lowfab
13 error Darwin 14.3.0
14 error argv "node" "/usr/local/bin/npm" "start"
15 error node v0.12.2
16 error npm  v2.7.6
17 error code ELIFECYCLE
18 error Lowfab@0.6.0 start: `cake start`
18 error Exit status 7
19 error Failed at the Lowfab@0.6.0 start script 'cake start'.
19 error This is most likely a problem with the Lowfab package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error     cake start
19 error You can get their info via:
19 error     npm owner ls Lowfab
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

This error was just introduced recently. With version ^4.0.0 it worked without any problems.

Any idea what's going on?

adius commented 9 years ago

getDeps() in dynamic cache is responsible (infinite recursion)

kjarnet commented 9 years ago

Any update on this? I get a similar error (every few reloads):

/home/okj/Prosjekter/adminweb20/node_modules/browserify-middleware/lib/dynamic-cache.js:38
  var getDeps = function (filename) {
                         ^
RangeError: Maximum call stack size exceeded
ForbesLindesay commented 9 years ago

This should now be fixed.