# npm-install-checks

> Check the engines and platform fields in package.json

Latest version **9.0.0** (published 2026-05-15) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install npm-install-checks
pnpm add npm-install-checks
yarn add npm-install-checks
bun add npm-install-checks
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 9.0.0 |
| Published | 2026-05-15 |
| First published | 2014-01-12 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^22.22.2 \|\| ^24.15.0 \|\| >=26.0.0 |
| Dependencies | 1 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 36 |
| Author | GitHub Inc. |
| Maintainers | saquibkhan, npm-cli-ops, reggi, owlstronaut |
| Keywords | npm,, install |

## Links

- npm: https://www.npmjs.com/package/npm-install-checks
- Repository: https://github.com/npm/npm-install-checks
- Homepage: https://github.com/npm/npm-install-checks#readme
- Issues: https://github.com/npm/npm-install-checks/issues
- npm.io page: https://npm.io/package/npm-install-checks

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^7.1.1

## Recent versions

- 9.0.0 (latest) — 2026-05-15
- 8.0.0 — 2025-10-22
- 7.1.2 — 2025-08-25
- 7.1.1 — 2024-11-21
- 7.1.0 — 2024-09-11
- 7.0.0 — 2024-09-05
- 6.3.0 — 2023-10-06
- 6.2.0 — 2023-08-14
- 6.1.1 — 2023-04-12
- 6.1.0 — 2023-03-21
- 6.0.0 — 2022-10-14
- 5.0.0 — 2022-04-05
- 4.0.0 — 2020-02-05
- 3.0.2 — 2019-09-30
- 3.0.1 — 2019-09-30
- … 12 more at https://npm.io/package/npm-install-checks/versions

## README

# npm-install-checks

Check the engines and platform fields in package.json

## API

Both functions will throw an error if the check fails, or return
`undefined` if everything is ok.

Errors have a `required` and `current` fields.

### .checkEngine(pkg, npmVer, nodeVer, force = false)

Check if a package's `engines.node` and `engines.npm` match the running system.

`force` argument will override the node version check, but not the npm
version check, as this typically would indicate that the current version of
npm is unable to install the package properly for some reason.

Error code: 'EBADENGINE'

### .checkPlatform(pkg, force, environment)

Check if a package's `os`, `cpu` and `libc` match the running system.

`force` argument skips all checks.

`environment` overrides the execution environment which comes from `process.platform` `process.arch` and current `libc` environment by default. `environment.os` `environment.cpu` and `environment.libc` are available.

Error code: 'EBADPLATFORM'


### .checkDevEngines(wanted, current, opts)

Check if a package's `devEngines` property matches the current system environment.

Returns an array of `Error` objects, some of which may be warnings, this can be checked with `.isError` and `.isWarn`. Errors correspond to an error for a given "engine" failure, reasons for each engine "dependency" failure can be found within `.errors`.

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