nodejs plugin doesn't set npm path for custom node version
Metadata
Current evaluation
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.
Suggested action: close stale
Reason: The issue is 2245 days old with 0 comments, no labels, and no maintainer interaction, and the reporter already documented a working PATH workaround (PATH=$PATH:$SNAPCRAFT_PART_SRC/../npm/bin). Beyond mere age, the nodejs plugin has been deprecated/removed from snapcraft in favor of the npm plugin, so the reported default-node behavior no longer applies to current versions.
Impact:
20
Quick Win:
12.0
Staleness:
92
Complexity:
40
Confidence:
60
Support Request:
25
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 |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
20
Quick Win:
12.0
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. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
30
Confidence:
85
Support Request:
10
|
close stale | nodejs plugin fails to update the npm path when a custom node version is specified, causing builds to use the default node. The report remains open with zero comments and no labels, indicating it is untriaged and stale. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1819804 nodejs plugin: build fails if there are missing peer dependencies. | snapcraft (launchpad) | open | Snapcraft nodejs plugin build fails when npm ls --json exits non-zero on missing peer deps; the CalledProcessError fallback is dead code since run_output wraps it in SnapcraftPluginCommandError. Open 7.5 years, unlabelled, no maintainer activity. | |
| #1838474 nodejs plugin assumes a version key in the package.json | snapcraft (launchpad) | open | Nodejs plugin crashed with KeyError when package.json lacked a version key, with no fallback to snapcraft.yaml version. Reported 2019, zero comments, no maintainer response. The nodejs plugin has since been removed and replaced by the npm plugin, so the referenced code no longer exists. | |
| #1660614 snapcraft's nodejs plugin does not refresh the global, user cache before installing dependencies | snapcraft (launchpad) | open | Legacy snapcraft nodejs plugin used npm --cache-min=Infinity, so a stale npm cache could cause ETARGET build failures when a dependency version was newly published. No maintainer response in ~9.5 years; the legacy plugin no longer exists in current snapcraft. |