npm-install-checks

WebJar for npm-install-checks

License

License

BSD 2-Clause
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

npm-install-checks
Last Version

Last Version

4.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

npm-install-checks
WebJar for npm-install-checks
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/npm/npm-install-checks

Download npm-install-checks

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/npm-install-checks/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>npm-install-checks</artifactId>
    <version>4.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/npm-install-checks/
implementation 'org.webjars.npm:npm-install-checks:4.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/npm-install-checks/
implementation ("org.webjars.npm:npm-install-checks:4.0.0")
'org.webjars.npm:npm-install-checks:jar:4.0.0'
<dependency org="org.webjars.npm" name="npm-install-checks" rev="4.0.0">
  <artifact name="npm-install-checks" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='npm-install-checks', version='4.0.0')
)
libraryDependencies += "org.webjars.npm" % "npm-install-checks" % "4.0.0"
[org.webjars.npm/npm-install-checks "4.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : semver jar [7.1.1,8)

Project Modules

There are no modules declared in this project.

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'

org.webjars.npm

npm

node package manager

Versions

Version
4.0.0
3.0.2
3.0.0