← Back to issue list

Node snaps don't work out of the box with classic confinement

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1706371
Type
issue
State
closed
Author
~ev
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed stale

Reason: The only substantive reply was ~sergiusens in 2017 explaining classic confinement is inherently manual and the interpreter/shebang must be handled by the snap author. After ~9 years with no fix, maintainer ~mr-cal closed it as stale on 2026-08-25 because the npm plugin had changed considerably since the report; no resolving PR or commit exists in the snapcraft repo.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Snapcraft puts $SNAP/bin on $PATH when creating a strictly confined snap, but not on classic. This means that classic snaps using the node plugin won't find node out of the box: $ heroku /snap/heroku/485/bin/heroku: line 19: node: command not found You have to explicitly include $SNAP/bin on the $PATH: $ git diff diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4caa0d5..1fbd2ac 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -8,7 +8,7 @@ confinement: classic apps: heroku: - command: bin/heroku + command: env PATH=$SNAP/bin:$PATH heroku parts: hello-node-snap: This is not discoverable. It requires understanding of the internals of classic confinement.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale 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.
stealth/space-bunny-alpha — closed stale Closed as stale after years without a fix; the closing maintainer said the npm plugin had changed considerably since the 2017 report.
qwen/qwen3.6-35b-a3b — — Closed as stale. The npm plugin has significantly changed since the report, rendering the classic confinement PATH issue obsolete. No fix was applied.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 95
Support Request: 10
close stale Node snaps fail to find the node command in classic confinement because $SNAP/bin is not automatically added to PATH.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 20
close stale Reports that Node snaps fail to find the node command in classic confinement due to missing $SNAP/bin in PATH. Unaddressed for over 9 years with zero maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Extremely old report (3270 days) about snapcraft not adding $SNAP/bin to PATH for classic confinement snaps. Zero maintainer interaction or comments.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#3625 (confidence 35%)

    Later npm plugin work (PRs #3624/#3625, e14123b4d) modernised the plugin but does not address $SNAP/bin on $PATH for classic confinement.

Related issues

Issue Project State Summary Similarity
#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.
70%