Skip to main content

NPM

NPM

The Node package manager for Node.js.

Configuration

Example

Use the following syntax to configure this plugin globally as part of config.yml:

ort:
analyzer:
packageManagers:
NPM:
options:
ignoreProjectNpmrcFiles: false
legacyPeerDeps: false

Use the following syntax to configure this plugin in a repository's .ort.yml:

analyzer:
package_managers:
NPM:
options:
ignoreProjectNpmrcFiles: false
legacyPeerDeps: false

If the plugin is configured in both locations, the configurations are merged, with options from .ort.yml taking precedence over those from config.yml.

Options

ignoreProjectNpmrcFiles

BOOLEAN Default

If true, ignore any project-specific .npmrc files.

legacyPeerDeps

BOOLEAN Default

If true, the "--legacy-peer-deps" flag is passed to NPM to ignore conflicts in peer dependencies which are reported since NPM 7. This allows to analyze NPM 6 projects with peer dependency conflicts. For more information see the documentation and the NPM Blog.