iriscouch / traceback

Easy access to the call stack, for Node.js
Apache License 2.0
44 stars 6 forks source link

TypeError: Cannot read property 'constructor' of undefined #7

Open zeroasterisk opened 8 years ago

zeroasterisk commented 8 years ago
node_modules/traceback/lib/frame.js:25
  frame.type      = frame.getTypeName()
                          ^
TypeError: Cannot read property 'constructor' of undefined
    at CallSiteGetTypeName (native)
    at Object.make_easy [as make] (/Users/alan/Code/eltoro/portal_v1/webapp/node_modules/traceback/lib/frame.js:25:27)
    at /Users/alan/Code/eltoro/portal_v1/webapp/node_modules/traceback/traceback.js:38:54
    var traceback = require('traceback');
    var stack = traceback();
    var last = stack.pop();
    var tb = '[' + ' in ' + last.file + ' @ ' + last.line + ']';

    for (var i = 1; i <= 3; i++) {
      tb = tb + '/[' + stack[i].name + ' in ' + stack[i].file + ' @ ' + stack[i].line + ']';
    }
raghuugare commented 8 years ago

I got the same error when I used the strict mode. However, it worked in non-strict mode.