- Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
Description
I have an array of errors which I want to convert with error-stack-parser.
What I did was basically this:
errors.map(ErrorStackParser.parse).forEach(console.log)Expected Behavior
I expected to get an array of StackFrames for each error.
Current Behavior
TypeError: Cannot read property 'parseV8OrIE' of undefined at ErrorStackParser$$parse (error-stack-parser.js:31:29) at Array.map (<anonymous>) at Object.<anonymous> (test.js:17:8) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) Steps to Reproduce (for bugs)
constErrorStackParser=require('error-stack-parser');consterrors=[newError()];errors.map(ErrorStackParser.parse).forEach(console.log);This works:
errors.forEach((error)=>console.log(ErrorStackParser.parse(error)))And surprisingly this works too:
errors.map((error)=>ErrorStackParser.parse(error)).forEach(console.log)Your Environment
error-stack-parser 2.0.1
Node.js 8.9.0
Windows 10