snapcraft npm doesn't respect npm-node-version
Metadata
Current evaluation
Legacy npm configuration was misleading: override-build bypasses the plugin-managed Node download; current craft-parts requires npm-include-node with npm-node-version.
Suggested action: close not a bug
Reason: The recipe's override-build replaces the npm plugin's build step, so its npm-node-version setting does not provision Node for the custom commands. Current craft-parts explicitly rejects npm-node-version when npm-include-node is false, and current documentation requires both keys; the reporter should use that flow or provision Node directly in override-build.
Evaluated by: mr-cal-bot
Impact:
30
Quick Win:
24
Complexity:
15
Confidence:
94
Actionability:
94
Issue body
I have this code and it always tells me v10.19.0. That's bad because vue cli needs a more recent version:
```
You are using Node v10.19.0, but vue-cli-service requires Node ^12.0.0 || >= 14.0.0.
Please upgrade your Node version.
```
```
axolotl-web:
plugin: npm
source: ./axolotl-web
npm-node-version: 14.13.0
override-build: |
# Due to the confinement this runs as root, and then we need this config
nodejs --version
npm config set unsafe-perm true
npm ci
npm run build
mkdir -p ../install/bin
cp -r dist ../install/bin/axolotl-web
stage:
- bin/axolotl-web
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
30
Quick Win:
24
Complexity:
15
Confidence:
94
Actionability:
94
|
close not a bug | Legacy npm configuration was misleading: override-build bypasses the plugin-managed Node download; current craft-parts requires npm-include-node with npm-node-version. | |
| stealth/space-bunny-alpha |
Impact:
32
Quick Win:
8
Complexity:
50
Confidence:
78
Actionability:
52
|
close not a bug | User's npm part with override-build kept getting system Node v10.19.0 despite npm-node-version: 14.13.0; maintainer explained override-build replaces the plugin's Node download step and the reporter acknowledged. Also invalid today (npm-node-version requires npm-include-node). | |
| stealth/space-bunny-alpha |
Impact:
25
Quick Win:
19
Complexity:
15
Confidence:
94
Actionability:
88
|
close not a bug | The 2021 report reflects legacy npm-plugin behavior: npm-node-version alone did not affect a custom build. Current craft-parts rejects that combination; npm-include-node: true is now required. | |
| stealth/space-bunny-alpha |
Impact:
38
Quick Win:
25
Complexity:
12
Confidence:
88
Actionability:
74
|
close not a bug | The reported override-build omits npm-include-node; current npm-plugin validation requires that key for npm-node-version to take effect, after which the downloaded Node runtime is placed first on PATH. | |
| qwen/qwen3.8-27b |
Impact:
35
Quick Win:
21
Staleness:
92
Complexity:
40
Confidence:
45
Support Request:
15
|
close stale | npm part ignores npm-node-version: build runs Node v10.19.0 instead of requested 14.13.0, breaking a vue-cli build. No maintainer activity or comments in ~4.7 years; npm part since moved to craft-parts where the property is supported. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
20
Confidence:
90
Support Request:
10
|
close stale | snapcraft npm plugin ignores npm-node-version config, defaulting to Node 10. User provided a snapcraft.yaml snippet and vue-cli error. Issue has zero comments and no maintainer response after over 4 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
25
Confidence:
85
Support Request:
10
|
close stale | Snapcraft's npm plugin ignores the npm-node-version property, defaulting to Node v10.19.0 instead of the specified version. Issue is untriaged with no maintainer activity for over 4 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
45
Confidence:
85
Support Request:
10
|
close stale | Snapcraft npm plugin ignores npm-node-version setting, defaulting to Node v10.19.0 and breaking vue-cli builds. Issue has been inactive for over 4.5 years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
35
Confidence:
80
Support Request:
10
|
needs triage | snapcraft npm plugin ignores the npm-node-version property, defaulting to Node v10.19.0 instead of the specified v14.13.0. Untriaged and inactive for over four years. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1632553 In the nodejs plugin, there is no way to specify the npm version required | snapcraft (launchpad) | closed | A dedicated npm plugin now supports selecting npm versions, resolving the legacy Node.js plugin limitation via craft-parts#200 (commit b9881154). | |
| #1886858 nodejs plugin doesn't set npm path for custom node version | snapcraft (launchpad) | open | Legacy nodejs builds could miss downloaded npm on PATH; current Snapcraft has replaced nodejs with npm and removed core18 support, leaving this old report obsolete. | |
| #770 NPM Plugin: wrong node version is used to build the package | craft-parts | open | NPM node setup is skipped when override-build replaces built-in steps, so builds fall back to system Node 12.22.9; a manual-install workaround and future pre-build hook are proposed. | |
| #1660614 snapcraft's nodejs plugin does not refresh the global, user cache before installing dependencies | snapcraft (launchpad) | open | The nodejs plugin's forced npm cache policy was superseded by configurable npm flags in #2038, and the legacy plugin was subsequently moved out in #2984; the issue remains open. | |
| #1838474 nodejs plugin assumes a version key in the package.json | snapcraft (launchpad) | open | Legacy nodejs plugin crashed when package.json omitted its optional version field; active Snapcraft now uses the npm plugin and no longer contains that implementation. |