# error-stack-parser-es

> Cross-browser Error parser

Latest version **2.0.1** (published 2026-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-stack-parser-es
pnpm add error-stack-parser-es
yarn add error-stack-parser-es
bun add error-stack-parser-es
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-07-03 |
| First published | 2023-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 90 |
| Maintainers | antfu |

## Links

- npm: https://www.npmjs.com/package/error-stack-parser-es
- Repository: https://github.com/antfu-collective/error-stack-parser-es
- Homepage: https://github.com/antfu-collective/error-stack-parser-es#readme
- Issues: https://github.com/antfu-collective/error-stack-parser-es/issues
- Funding: https://github.com/sponsors/antfu
- npm.io page: https://npm.io/package/error-stack-parser-es

## Recent versions

- 2.0.1 (latest) — 2026-07-03
- 2.0.0 — 2026-07-03
- 1.0.5 — 2025-01-09
- 0.1.5 — 2024-07-17
- 0.1.4 — 2024-05-14
- 0.1.3 — 2024-05-13
- 0.1.2 — 2024-05-13
- 0.1.1 — 2023-08-12
- 0.1.0 — 2023-07-12
- 0.0.0 — 2023-07-12

## README

# error-stack-parser-es

[![NPM version](https://img.shields.io/npm/v/error-stack-parser-es?color=a1b858&label=)](https://www.npmjs.com/package/error-stack-parser-es)

A port of [stacktracejs/error-stack-parser](https://github.com/stacktracejs/error-stack-parser), rewrite with TypeScript and ES Modules.

## Usage

```ts
import { parse } from 'error-stack-parser-es'

const stacktrace = parse(new Error('BOOM!'))
```

Refer to [stacktracejs/error-stack-parser](https://github.com/stacktracejs/error-stack-parser) for more details.

### Lite API

Additionally, this fork added a lite version of the API representation for the stack frames. You can import it from `error-stack-parser-es/lite`. For example, `line` and `col` instead of `lineNumber` and `columnNumber`.

```ts
import { parse } from 'error-stack-parser-es/lite'

const stacktrace = parse(new Error('BOOM!'))
// [{ file: 'file.js', name: 'method', line: 1, col: 2}]
```

It also allows you to parse directly from a stacktrace string (which does not support Opera stacktrace format).

```ts
import { parseStack } from 'error-stack-parser-es/lite'

const stacktrace = parseStack('Error\n    at method (file.js:1:2)')
// [{ file: 'file.js', name: 'method', line: 1, col: 2}]
```

## License

[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
[MIT](./LICENSE) License © 2017 [Eric Wendelin](https://github.com/eriwen)

---
_Source: https://npm.io/package/error-stack-parser-es · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
