long-stack-traces
long-stack-traces copied to clipboard
Type error in long-stack-traces.js:7
If i require the module in asimple mocha test:
chai = require 'chai'
expect = chai.expect
require 'long-stack-traces'
it "should work", ->
# do nothin and succeed
expect(1+1).to.equal 2
The following error will occure:
/home/alex/a3/node-error/node_modules/long-stack-traces/lib/long-stack-traces.js:7
e = new Error().stack.split("\n")[1].match(/^ at ((?:\w+://)?[^:]+)/)[1];
^
TypeError: Cannot read property '1' of null
at /home/alex/a3/node-error/node_modules/long-stack-traces/lib/long-stack-traces.js:7:90
at Object.
I'm getting the same bug
I think it's related to coffeescript. My coffeescript app has a top-level app.js (in javascript). If I require long-stack-traces after coffeescript, I get the error you describe. If I do it before, no error (though, admittedly, my stack traces are not longer).
require('long-stack-traces')
require('coffee-script/register');