node plugin fails to capture symlink
Metadata
Current evaluation
Fixed by canonical/snapcraft#1418 (commit b1154631d): the Node.js plugin copied out-of-tree symlink targets during staging, resolving the Heroku CLI packaging failure.
Resolution: closed resolved
Reason: Commit b1154631d from PR #1418 updated the Node.js plugin to copy out-of-tree symlink targets, directly addressing the missing prime/bin/heroku target.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Given https://github.com/heroku/cli/blob/bb510a5ab5c970c8e911d3741849d1c41aa30945/snap/snapcraft.yaml
$ snapcraft
Preparing to pull hello-node-snap
Pulling hello-node-snap
Downloading 'node-v8.1.3-linux-x64.tar.gz'[===========================================================================================================================================================] 100%
npm --cache-min=Infinity install --global heroku-cli
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
added 377 packages in 25.841s
npm --cache-min=Infinity install
npm WARN prefer global node-gyp@3.6.2 should be installed with -g
npm WARN prefer global foreman@2.0.0 should be installed with -g
npm notice created a lockfile as package-lock.json. You should commit this file.
added 376 packages in 21.984s
npm --cache-min=Infinity install --global
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 7.355s
Preparing to build hello-node-snap
Building hello-node-snap
npm --cache-min=Infinity install --global heroku-cli
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 5.395s
npm --cache-min=Infinity install
up to date in 4.045s
npm --cache-min=Infinity install --global
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 6.208s
Staging hello-node-snap
Priming hello-node-snap
[Errno 2] No such file or directory: '/branches/cli/prime/bin/heroku'
Digging:
$ ls prime/bin/heroku -la
lrwxrwxrwx 1 ev dialout 38 Jul 6 05:16 prime/bin/heroku -> ../lib/node_modules/heroku-cli/bin/run
$ ls -la prime/lib/node_modules/heroku-cli
lrwxrwxrwx 1 ev dialout 14 Jul 6 05:16 prime/lib/node_modules/heroku-cli -> ../../../build
$ ls -la parts/hello-node-snap/install/bin/heroku
lrwxrwxrwx 1 ev dialout 38 Jul 6 05:16 parts/hello-node-snap/install/bin/heroku -> ../lib/node_modules/heroku-cli/bin/run
$ ls -la parts/hello-node-snap/install/lib/node_modules/heroku-cli
lrwxrwxrwx 1 ev dialout 14 Jul 6 05:16 parts/hello-node-snap/install/lib/node_modules/heroku-cli -> ../../../build
$ ls -la parts/hello-node-snap/build/bin/run
-rwxrwxr-x 1 ev dialout 537 Jul 6 03:31 parts/hello-node-snap/build/bin/run
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/snapcraft#1418 (commit b1154631d): the Node.js plugin copied out-of-tree symlink targets during staging, resolving the Heroku CLI packaging failure. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/snapcraft#1418 (commit b1154631d): the Node.js plugin now copies out-of-tree symlink targets during staging, resolving the Heroku CLI packaging failure. | |
| stealth/space-bunny-alpha | — | closed resolved | Heroku CLI snap build failed with "[Errno 2] ... prime/bin/heroku": the node plugin did not preserve the out-of-tree symlink to ../../../build. Fixed by canonical/snapcraft#1418 (commit b1154631d, "nodejs plugin: copy the content of out of tree symlinks"). | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft’s node plugin mishandled Heroku CLI’s out-of-tree symlinks; canonical/snapcraft#1418 fixed staging by copying their contents. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The snapcraft node plugin failed to resolve symlinks during the prime stage, causing a missing file error. No fix or follow-up was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned due to inactivity. The snapcraft node plugin failed to capture symlinks during staging, causing a missing file error. No fix was implemented or merged. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1418
(confidence 100%)
The linked PR was merged as commit b1154631d and implemented the symlink fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1418 nodejs plugin: copy the content of out of tree symlinks | snapcraft | merged | Merged PR #1418 (commit b1154631d) fixed the Node.js plugin to copy content from out-of-tree symlinks, resolving the Heroku link-farm problem in LP #1702661. | |
| #1590108 Go plugin breaks with snapcraft.yaml in tree | snapcraft (launchpad) | closed | Fixed by hard-linking local sources instead of symlinking them, preventing recursive GOPATH traversal; merged in snapcore/snapcraft#622 (commit a07fa0faa). |