← Back to issue list

nodejs plugin: fail gracefully when a package.json is missing

View original Github issue

Metadata

Project
snapcraft
Number
#2424
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/snapcraft#2424 as 99b7cc984, making the Node.js plugin fail gracefully when package.json is missing; resolves LP #1807971.

Resolution: closed resolved

Reason: PR #2424 was merged as commit 99b7cc984, adding graceful handling for a missing package.json and resolving LP #1807971/SNAPCRAFT-9X.

Evaluated by: mr-cal-bot

No scores available.

Issue body

LP: #1807971 Fixes SNAPCRAFT-9X Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#2424 as 99b7cc984, making the Node.js plugin fail gracefully when package.json is missing; resolves LP #1807971.
stealth/space-bunny-alpha — closed resolved PR #2424 merged as commit 99b7cc984, making the Node.js plugin fail gracefully when package.json is missing; resolves LP #1807971 and SNAPCRAFT-9X.
qwen/qwen3.6-35b-a3b — — Merged into master. The nodejs plugin now fails gracefully when package.json is missing, resolving LP #1807971 and SNAPCRAFT-9X. The change adds 40 lines and removes 8 across two files, achieving 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. The nodejs plugin now fails gracefully when a package.json is missing, resolving LP #1807971. Changes passed static and unit tests, received maintainer approval, and achieved 100% diff coverage before integration.

Update history

No update history recorded yet.

Related issues

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