generator-angular-fullstack
generator-angular-fullstack copied to clipboard
Maximum call stack size exceeded on gulp test:server
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 |
The call to coffee-script
seems suspicious
You need any more information?
Any extra info couldn't hurt
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.
@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
Does installing from master fix it?
Installing gulp-mocha
from master fix it
@ingoncalves okay well I guess we'll just have to wait for the next patch version to be released
Still experiencing this issue, but @ingoncalves solution fixed it.
3.0.1 is the latest version, we'll have to make sure we use that one
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",
Updating gulp-mocha to 4.3.1 fixed my issue
npm i gulp-mocha@lastest --save-dev