nodejs plugin doesn't set npm path for custom node version
Metadata
Current evaluation
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.
Suggested action: close stale
Reason: The reported nodejs and nodejs-version configuration is absent from the current tree: the migration guide says nodejs is now npm, and commits 40136ea9b, 77edc734b, and ed423b6a8 remove core18 support. Ogra confirmed a legacy PATH defect, but the later core20 report is not a reproducer for the replacement npm plugin, so the old subsystem is demonstrably retired.
Evaluated by: mr-cal-bot
Impact:
48
Quick Win:
20
Complexity:
42
Confidence:
76
Actionability:
72
Issue body
The nodejs plugin allows a developer to specify a specific version of node to be used (which I needed to do because electron-packager needs at least 10.12 and the default is 8.10). E.g.
parts:
my-part:
plugin: nodejs
nodejs-version: 12.18.2
When I set a custom node version as above, I can see the build.snapcraft.io build server downloading node-v12.18.2-linux-armv7l.tar.gz, but then it still seems to use node 8.10.0 to execute commands so electron-packager still can't run.
After getting advice from ogra in IRC I managed to work around this by manually setting the path in overide-build:
PATH=$PATH:$SNAPCRAFT_PART_SRC/../npm/bin
Full build log here: https://build.snapcraft.io/user/krellian/kiosk/1034267
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
20
Complexity:
42
Confidence:
76
Actionability:
72
|
close stale | 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. | |
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
18
Complexity:
44
Confidence:
80
Actionability:
68
|
keep open | Node.js plugin builds can resolve distro npm or Node instead of the custom runtime; the scoped npm-without-build-package case is acknowledged, but core18/core20 behavior still needs verification. | |
| qwen/qwen3.6-35b-a3b |
Impact:
30
Quick Win:
22
Complexity:
10
Confidence:
85
Actionability:
80
|
close resolved | nodejs plugin fails to use custom node version for command execution; plugin has been renamed to npm in newer Snapcraft versions | |
| qwen/qwen3.8-27b |
Impact:
20
Quick Win:
12
Staleness:
92
Complexity:
40
Confidence:
60
Support Request:
25
|
close stale | Bug: snapcraft's nodejs plugin downloads a custom nodejs-version but still runs build commands with the default node, leaving npm out of PATH. Reporter supplied a PATH workaround. 6 years old, no labels, zero comments, no maintainer response; nodejs plugin since deprecated/removed. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
25
Confidence:
85
Support Request:
10
|
close stale | Nodejs plugin fails to update PATH when specifying a custom nodejs-version, causing builds to use the system default instead. Issue is 6 years old with no maintainer response and a provided workaround. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
15
Confidence:
85
Support Request:
10
|
close stale | Nodejs plugin fails to update PATH when a custom node version is specified, causing npm commands to use the system default. Untriaged, inactive for over six years, zero maintainer comments. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
20
Confidence:
90
Support Request:
10
|
needs triage | Snapcraft nodejs plugin fails to update PATH when specifying a custom nodejs-version, causing builds to use the system default node instead of the requested version. Untriaged, no comments, inactive for ~6 years. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
snapcraft#2356
(confidence 40%)
Historical nodejs plugin base-support change; it predates the later core18 removal and does not establish a PATH fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1955887 snapcraft npm doesn't respect npm-node-version | snapcraft (launchpad) | open | Legacy npm configuration was misleading: override-build bypasses the plugin-managed Node download; current craft-parts requires npm-include-node with npm-node-version. | |
| #1652542 nodejs plugin does not download dependencies from package.json to the correct location | snapcraft (launchpad) | closed | Reported that the nodejs plugin omitted cwd when installing package.json deps. Fixed by snapcore/snapcraft PR #1023, merged to snapcraft as commit d3b476573 ("nodejs plugin: fix the plugin's dependency installation"). | |
| #1877479 'nodejs' vs 'npm' core20 confusion | snapcraft (launchpad) | closed | Updated npm v2 plugin help to use “npm” rather than “nodejs” and directed core20 guidance to online docs. Fixed by merged PR snapcore/snapcraft#3114 (a7d79b97e). | |
| #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. | |
| #1706371 Node snaps don't work out of the box with classic confinement | snapcraft (launchpad) | closed | 2017 report that the node plugin doesn't put $SNAP/bin on $PATH for classic snaps; never fixed. Closed as stale in Aug 2026 by ~mr-cal, noting the npm plugin has changed considerably since. |