</>PackageGraphPackageGraph

serialize-error

npmv13.0.1TypeScript

Serialize/deserialize an error into a plain object

Safe to adopt

Yes — serialize-error scores well across adoption, maintenance, weight, supply chain, and licensing. 32.8M downloads per week and 2 known dependents. Last published 234 days ago. 3 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    32.8M downloads per week and 2 known dependents.

  • BMaintenance: grade B, Good.

    Last published 234 days ago. 3 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 3 transitive packages, about 596 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding serialize-error to a project.

2
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

596 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

(MIT OR CC0-1.0)MIT

Every license you inherit by installing serialize-error, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >=20
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the serialize-error README.

import {serializeError, deserializeError} from 'serialize-error';

const error = new Error('🦄');

console.log(error);
//=> [Error: 🦄]

const serialized = serializeError(error);

console.log(serialized);
//=> {name: 'Error', message: '🦄', stack: 'Error: 🦄\n    at Object.<anonymous> …'}

const deserialized = deserializeError(serialized);
Example truncated — see the full README.

serialize-error vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
serialize-errorthis page32.8M2MIT7 months ago
object-inspect164.9M24MIT9 days ago
non-error01MIT9 days ago
color-convert342.8M1MIT8 days ago
has-flag321.6M1MIT9 days ago
camelcase185M2MIT8 days ago

Dependencies

Declared by serialize-error v13.0.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (4)

ava ^6.4.1expect-type ^1.3.0tsd ^0.33.0xo ^1.2.3

Used by

Popular packages that depend on serialize-error.

Relationship graph

Dependencies (left) and dependents (right) of serialize-error.

type-festnon-errorwebdriveriometroserialize-error
serialize-error dependencies dependents

Frequently installed together

Release history

3 releases in the last two years, typically about 77 days apart.

Recent versions of serialize-error
VersionPublishedSizeLicense
13.0.1latest7 months ago20 KBMIT
13.0.07 months ago19 KBMIT
12.0.01 year ago17 KBMIT
11.0.32 years ago16 KBMIT
11.0.23 years ago16 KBMIT
11.0.13 years ago16 KBMIT
11.0.04 years ago16 KBMIT
10.0.04 years ago16 KBMIT
9.1.14 years ago11 KBMIT
9.1.04 years ago11 KBMIT
9.0.04 years ago11 KBMIT
8.1.05 years ago10 KBMIT
8.0.15 years ago8.7 KBMIT
8.0.05 years ago8.7 KBMIT
7.0.16 years ago6.7 KBMIT

Overview

serialize-error is an npm package that serialize/deserialize an error into a plain object. It is extremely widely used, with about 32.8M downloads per week and 2 known dependents in the graph. The latest version is 13.0.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need serialize/deserialize an error into a plain object and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (32.8M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use serialize-error?

Yes — serialize-error scores well across adoption, maintenance, weight, supply chain, and licensing. 32.8M downloads per week and 2 known dependents. Last published 234 days ago. 3 releases in the last 2 years.

How do I install serialize-error?

Run `npm install serialize-error` to add serialize-error to your npm project.

How many dependencies does serialize-error have?

serialize-error declares 6 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 596 KB on disk.

What license is serialize-error released under?

serialize-error is distributed under the MIT license. Its dependency tree also includes: (MIT OR CC0-1.0), MIT.

How popular is serialize-error?

serialize-error has approximately 32,775,741 downloads per week and 2 known dependent packages.

Is serialize-error still maintained?

The most recent release of serialize-error (v13.0.1) was published 7 months ago.

Does serialize-error run install scripts?

No. serialize-error does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.