# p-fatal

> Re-throw unhandled promise rejections in the next turn, so other listeners get a chance to also run.

Latest version **0.1.7** (published 2026-04-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install p-fatal
pnpm add p-fatal
yarn add p-fatal
bun add p-fatal
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2026-04-16 |
| First published | 2018-08-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | M.K. |
| Maintainers | mk-pmb |
| Keywords | promise, promises, rejection, unhandled rejection |

## Links

- npm: https://www.npmjs.com/package/p-fatal
- Repository: https://github.com/mk-pmb/p-fatal-js
- Homepage: https://github.com/mk-pmb/p-fatal-js/#readme
- Issues: https://github.com/mk-pmb/p-fatal-js/issues
- npm.io page: https://npm.io/package/p-fatal

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 0.1.7 (latest) — 2026-04-16
- 0.1.6 — 2026-04-05
- 0.1.5 — 2023-08-28
- 0.1.3 — 2020-05-29
- 0.1.2 — 2019-03-15
- 0.1.1 — 2018-08-14

## README

<!--#echo json="package.json" key="name" underline="=" -->
p-fatal
=======
<!--/#echo -->

<!--#echo json="package.json" key="description" -->
Re-throw unhandled promise rejections in the next turn, so other listeners get
a chance to also run.
<!--/#echo -->



API
---

This module exports nothing.
It does all work as a side effect of importing it.



<!--#toc stop="scan" -->



Known issues
------------

* Versions 0.1.x don't care whether the rejection becomes handled later.
  I currently consider this a feature, but I'd be willing to offer opt-out.
  I think it's still a better idea to setup your rejection handlers asap.
* Version 0.1.6 didn't register its handler in Node.js v24+,
  because I mistakenly assumed Node.js itself would now deal with unhandled
  promise rejections. When I added the CI test for process return value
  (exit status) though, it proved that Node.js would exit with 0 (success),
  so I had to revert that change in v0.1.7.



&nbsp;


License
-------
<!--#echo json="package.json" key=".license" -->
ISC
<!--/#echo -->

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