I am running a node.js app and for some reason the node app is failing when requiring the bluebird module require('bluebird').
0.10.403.3.4This is really strange and the only thing I have to go off of is the stack trace here:
TypeError: Cannot call method 'split' of undefined
at Object.setBounds (app/node_modules/bluebird/js/release/debuggability.js:614:48)
at module.exports (app/node_modules/bluebird/js/release/promise.js:762:11)
at Object.<anonymous> (app/node_modules/bluebird/js/release/bluebird.js:9:36)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
var firstStackLines = firstLineError.stack.split("\n");
Again, the app runs just fine. When I add this one line require('bluebird') it crashes and I get this stack trace. Any ideas on what this error is coming from?
[Edit]
at line node_modules/bluebird/js/release/debuggability.js:614:48
> console.log(firstLineError);
[Error]
> console.log(firstLineError.message);
> console.log(firstLineError.stack);
undefined
> console.log(firstLineError.toString());
Error: Error
> console.log(firstLineError instanceof Error);
True
It is an Error object that is essentially empty
temporary solution
When I change the line node_modules/bluebird/js/release/debuggability.js:614 to
var firstStackLines = (firstLineError.stack) ? firstLineError.stack.split("\n") : "";
and line 615 to
var lastStackLines = (lastLineError.stack) ? lastLineError.stack.split("\n") : "";
it works just fine. Not sure if this has lasting effects though
I had the similar failures, more specifically:
.../node_modules/bluebird/js/release/debuggability.js:673
var firstStackLines = firstLineError.stack.split("\n");
when using node 6.2.2 with bluebird^3.4.1.
Upgrading to bluebird^3.4.6 with node v6.2.2 helped fix the error.
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