The npm plugin
The plugin uses node to install dependencies from
package.json. It also sets up binaries defined in
package.json by adding them to
This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata.
Plugin-specific features and syntax are dependent on which base is being used, as outlined below:
This plugin uses the following plugin-specific keywords:
npm-include-node(bool, default: false) If true, download and include the node binary and its dependencies. If
npm-include-nodeis true, then
npm-node-versionmust be defined.
npm-node-version(string) The version of node.js you want the snap to run on and includes npm, as would be downloaded from (https://nodejs.org). If not set, node.js must be provided another way, such as creating a
node-depspart that provides node using build and staging dependencies or manually. Search GitHub for examples.
Requires Snapcraft version 7.0+.
This plugin uses the following required plugin-specific keyword:
npm-node-version(string) The version of node.js you want the snap to run on and includes npm, as would be downloaded from (https://nodejs.org).
Requires Snapcraft version 4.0+.
Last updated 2 months ago.