generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Maximum call stack size exceeded on gulp test:server

Open ingoncalves opened this issue 8 years ago • 12 comments

After generate my app and run it normally, I simulated an error on server/api/user/user.integration.js adding code: res.body.foo.should.equal('bar'); on line 54.

The test froze and I got the following error:

GET /api/users/me 200 12.153 ms - 102
/home/user/myapp/node_modules/gulp-mocha/index.js:47
                    stack: err.stack,
                              ^
RangeError: Maximum call stack size exceeded
  at Array.join (native)
  at Function.Error.prepareStackTrace (/home/user/myapp/node_modules/coffee-script/lib/coffee-script/coffee-script.js:373:46)
  at Domain.handleException (/home/user/myapp/node_modules/gulp-mocha/index.js:47:16)
  at emitOne (events.js:90:13)
  at Domain.emit (events.js:182:7)
  at emitError (domain.js:66:24)
  at Domain.errorHandler [as _errorHandler] (domain.js:110:18)
  at process._fatalException (node.js:234:33)
  at Domain.errorHandler [as _errorHandler] (domain.js:137:26)
  at process._fatalException (node.js:234:33)
  at Domain.errorHandler [as _errorHandler] (domain.js:137:26)
  at process._fatalException (node.js:234:33)
...
Item Version
OS Ubuntu 16.04
generator-angular-fullstack 3.6.1
node 5.11.0
npm 3.8.8
yo 1.7.0
mocha 2.4.5
Item Answer
Transpiler Babel
Markup Jade
CSS SCSS
Router ui-router
Build Tool Gulp
Client Tests Mocha
DB MongoDB
Auth Y

ingoncalves avatar May 04 '16 21:05 ingoncalves

The call to coffee-script seems suspicious

Awk34 avatar May 04 '16 22:05 Awk34

You need any more information?

ingoncalves avatar May 04 '16 22:05 ingoncalves

Any extra info couldn't hurt

Awk34 avatar May 05 '16 06:05 Awk34

I reproduce this issue in another computer and got the following error:

/home/user/myapp/node_modules/gulp-util/lib/PluginError.js:45
        self[prop] = options.error[prop];
                                  ^

RangeError: Maximum call stack size exceeded
  at /home/user/myapp/node_modules/gulp-util/lib/PluginError.js:45:35
  at Array.forEach (native)
  at new PluginError (/home/user/myapp/node_modules/gulp-util/lib/PluginError.js:44:8)
  at Domain.handleException (/home/user/myapp/node_modules/gulp-mocha/index.js:46:24)
  at emitOne (events.js:90:13)
  at Domain.emit (events.js:182:7)
  at emitError (domain.js:66:24)
  at Domain.errorHandler [as _errorHandler] (domain.js:110:18)
  at process._fatalException (node.js:234:33)
  at Domain.errorHandler [as _errorHandler] (domain.js:137:26)
  at process._fatalException (node.js:234:33)
  at Domain.errorHandler [as _errorHandler] (domain.js:137:26)
  at process._fatalException (node.js:234:33)
  at Domain.errorHandler [as _errorHandler] (domain.js:137:26)
  at process._fatalException (node.js:234:33)
  ... many lines later
  at Domain.errorHandler [as _errorHandler] (domain.js:110:18)
  at process._fatalException (node.js:234:33)

Item Version
OS Ubuntu 14.04
node 5.11.0
npm 3.8.8
yo 1.7.0
mocha 2.4.5

PS: the code tested is the same, just clone my git repo and run test in another computer.

ingoncalves avatar May 05 '16 11:05 ingoncalves

@Awk34 can you reproduce?

I was analyzing that error and I arrived on gulp-mocha plugin. This erro has been fixed on https://github.com/sindresorhus/gulp-mocha/pull/114, but the latest version was not yet released to npm.

So i installed this module by:

npm  install --save-dev https://github.com/sindresorhus/gulp-mocha.git

ingoncalves avatar May 05 '16 13:05 ingoncalves

Does installing from master fix it?

Awk34 avatar May 07 '16 02:05 Awk34

Installing gulp-mocha from master fix it

ingoncalves avatar May 09 '16 12:05 ingoncalves

@ingoncalves okay well I guess we'll just have to wait for the next patch version to be released

Awk34 avatar May 13 '16 19:05 Awk34

Still experiencing this issue, but @ingoncalves solution fixed it.

huyouare avatar Sep 28 '16 12:09 huyouare

3.0.1 is the latest version, we'll have to make sure we use that one

Awk34 avatar Sep 28 '16 17:09 Awk34

Just experienced this error.

api/node_modules/gulp-mocha/index.js:47
					stack: err.stack,
					          ^
RangeError: Maximum call stack size exceeded
  at /api/node_modules/coffee-script/lib/coffee-script/coffee-script.js:366:19
  at Function.Error.prepareStackTrace (/api/node_modules/coffee-script/lib/coffee-script/coffee-script.js:372:7)
  at RangeError.get stack [as stack] (native)
  at Domain.handleException (/api/node_modules/gulp-mocha/index.js:47:16)
  at emitOne (events.js:96:13)
  at Domain.emit (events.js:188:7)
  at Domain._errorHandler (domain.js:97:23)
  at process._fatalException (bootstrap_node.js:293:33)
  at Domain._errorHandler (domain.js:124:26)
  at process._fatalException (bootstrap_node.js:293:33)
  at Domain._errorHandler (domain.js:124:26)
  at process._fatalException (bootstrap_node.js:293:33)

Looks like the package.json is still using

 "gulp-mocha": "^2.1.3",

jspenc72 avatar Sep 21 '17 05:09 jspenc72

Updating gulp-mocha to 4.3.1 fixed my issue

npm i gulp-mocha@lastest --save-dev

jspenc72 avatar Sep 21 '17 05:09 jspenc72