npm-install-checks
Check the engines and platform fields in package.json
Last updated 3 years ago by lukekarrys .
BSD-2-Clause · Repository · Bugs · Original npm
$ cnpm install npm-install-checks 
SYNC missed versions from official npm registry.

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 node/npm version is supported by the package. If it isn't supported, an error is thrown.

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)

Check if OS/Arch is supported by the package.

Error code: 'EBADPLATFORM'

Current Tags

  • 6.0.0                                ...           latest (3 years ago)

6 Versions

  • 6.0.0                                ...           3 years ago
  • 5.0.0                                ...           3 years ago
  • 4.0.0                                ...           6 years ago
  • 1.0.7                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 3.0.2                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org