
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
error-stack-parser
Advanced tools
Simple, cross-browser Error parser.
This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error's stack as
an Array of StackFrames.
Once you have parsed out StackFrames, you can do much more interesting things. See stacktrace-gps.
Note that in IE9 and earlier, Error objects don't have enough information to extract much of anything. In IE 10, Errors
are given a stack once they're thrown.
ErrorStackParser.parse(new Error('BOOM'));
=> [
StackFrame({functionName: 'foo', args: [], fileName: 'path/to/file.js', lineNumber: 35, columnNumber: 79, isNative: false, isEval: false}),
StackFrame({functionName: 'Bar', fileName: 'https://cdn.somewherefast.com/utils.min.js', lineNumber: 1, columnNumber: 832, isNative: false, isEval: false, isConstructor: true}),
StackFrame(... and so on ...)
]
npm install error-stack-parser
bower install error-stack-parser
https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js
Want to be listed as a Contributor? Start with the Contributing Guide!
stacktrace-js provides similar functionality to error-stack-parser by offering mechanisms to capture, parse, and manipulate JavaScript stack traces. It goes a bit further by also allowing stack trace collection from all browsers and generating stack traces from thrown errors or caught exceptions. Compared to error-stack-parser, stacktrace-js might offer a broader set of features for handling stack traces across different environments.
source-map-support is a package that adds source map support to node.js (for converting compiled code locations to their original source locations). While not a direct alternative to error-stack-parser, it complements its functionality by allowing developers to obtain accurate stack traces in their original source code, not the transpiled or compiled version. This is especially useful in projects where code is bundled or transpiled.
FAQs
Extract meaning from JS Errors
The npm package error-stack-parser receives a total of 14,073,394 weekly downloads. As such, error-stack-parser popularity was classified as popular.
We found that error-stack-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.