nodejs snaps fail when source is not a local directory
Metadata
Current evaluation
The nodejs plugin incorrectly constructs the package.json path when using a remote URL as source, breaking snap builds. The report was closed without a fix or resolution.
Suggested action: —
No scores available.
Issue body
I'm trying to build the truffle snap, with the attached snapcraft.yaml
It has as source:
source: https://github.com/trufflesuite/truffle.git
When I run snapcraft in here, it installs npm but doesn't do anything about truffle. The problem is that on the nodejs plugin, we do:
self._source_package_json = os.path.join(os.path.abspath(self.options.source), 'package.json')
That gets evaluated to:
'/home/ubuntu/workspace/elopio/truffle-snap/https:/github.com/trufflesuite/truffle.git/package.json'
Which is of course wrong.
So the plugin can't find the package.json file, and installs nothing.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | The nodejs plugin incorrectly constructs the package.json path when using a remote URL as source, breaking snap builds. The report was closed without a fix or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The nodejs snapcraft plugin incorrectly constructed the package.json path when using a remote git URL as the source, causing builds to fail. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1731003 node app builds forked, but not referencing upstream source | snapcraft (launchpad) | open | Snapcraft 2.34 node plugin fails to build when source is a remote URL (rimraf not found, node_modules missing) while a local checkout builds fine. 8.8 years old, zero maintainer interaction; the 2.x node plugin has since been rewritten in snapcraft 8.x. |