Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

NPM

Security covered Maintenance fixes only 43 sites

This module provides tools to interact with NPM and its associated package managers like Yarn. It allows Drupal to find and utilize available package manager executables for various tasks.

Provides tools to interact with NPM.

Usage

  /** @var Drupal\npm\Plugin\NpmExecutableInterface $npmExecutable */
  $npmExecutable = \Drupal::service('plugin.manager.npm_executable')->getExecutable();

Details

Right now yarn is the only supported executable. Others can be added by implementing NpmExecutable Plugins. Each plugin has a weight that determines its priority and an isAvailable method that tells if it's operational (e.g. yarn is installed). The plugin manager's getExecutable method returns the first available executable.

Related modules

Drupal 9–11

Ask your assistant about NPM

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

1 tracked project depends on this one

Activity

Tracked releases
3
Tracked since
Jan 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.1 Stable 9–11 Sep 4, 2025
3.0.0 Stable 9–10 Jan 22, 2024
3.x-dev Dev 9–11 Jan 22, 2024