You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. (/home/alex/a3/node-error/node_modules/long-stack-traces/lib/long-stack-traces.js:265:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/alex/a3/node-error/test/mocha/index.coffee:4:1)
at Object. (/home/alex/a3/node-error/test/mocha/index.coffee:1:1)
at Module._compile (module.js:456:26)
at Object.loadFile (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
at Module.load (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:185:27
at Array.forEach (native)
at Mocha.loadFiles (/usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:182:14)
at Mocha.run (/usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:394:31)
at Object. (/usr/lib/node_modules/alinex-builder/node_modules/mocha/bin/_mocha:394:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
The text was updated successfully, but these errors were encountered:
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).
If i require the module in asimple mocha test:
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. (/home/alex/a3/node-error/node_modules/long-stack-traces/lib/long-stack-traces.js:265:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/alex/a3/node-error/test/mocha/index.coffee:4:1)
at Object. (/home/alex/a3/node-error/test/mocha/index.coffee:1:1)
at Module._compile (module.js:456:26)
at Object.loadFile (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
at Module.load (/usr/lib/node_modules/alinex-builder/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:185:27
at Array.forEach (native)
at Mocha.loadFiles (/usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:182:14)
at Mocha.run (/usr/lib/node_modules/alinex-builder/node_modules/mocha/lib/mocha.js:394:31)
at Object. (/usr/lib/node_modules/alinex-builder/node_modules/mocha/bin/_mocha:394:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
The text was updated successfully, but these errors were encountered: