← Back to issue list

nodejs plugin does not download dependencies from package.json

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1623509
Type
issue
State
closed
Author
~jonathon-love
Labels
—
Created
Updated
Closed

Current evaluation

Fixed in merged PR #800 via commit ced6edd9c: the Node.js plugin now installs package.json devDependencies during the build phase.

Resolution: closed resolved

Reason: GitHub PR #800 was merged as commit ced6edd9c, whose change installs package.json devDependencies during the Node.js plugin build phase and directly addresses LP #1623509.

Evaluated by: mr-cal-bot

No scores available.

Issue body

sorry, the title should read 'nodejs plugin does not download devDependencies from package.json' package.json files contain devDependencies, which can be used by the prepublish script: "If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a prepublish script."[1] however, these are not installed during the build phase, and so a prepublish script depending on devDependencies will fail. [1] https://docs.npmjs.com/misc/scripts

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #800 via commit ced6edd9c: the Node.js plugin now installs package.json devDependencies during the build phase.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #800 (commit ced6edd9c), which made the Node.js plugin install package.json devDependencies during builds.
stealth/space-bunny-alpha — closed resolved Fixed in snapcraft#800 (commit ced6edd9c): the Node.js plugin now installs package.json devDependencies during the build, allowing prepublish scripts to use them.
qwen/qwen3.6-35b-a3b — — Abandoned. Closed without resolution. The nodejs plugin remains unpatched, continuing to skip devDependencies installation during build and breaking prepublish scripts.
qwen/qwen3.6-35b-a3b — — Abandoned. The nodejs plugin fails to install devDependencies from package.json, breaking prepublish scripts during builds. No fix was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#800 (confidence 100%)

    Merged PR that fixed the missing devDependencies installation reported in LP #1623509.

Related issues

Issue Project State Summary Similarity
#800 LP: #1623509 nodejs: fix to install dev-deps in build phase snapcraft merged Merged as commit ced6edd9c, PR #800 fixed LP #1623509 by installing package.json devDependencies during the Node.js plugin build phase.
80%
#1023 nodejs plugin: fix the plugin’s dependency installation snapcraft merged Merged PR #1023 as commit d3b476573, fixing the Node.js plugin’s dependency installation for LP #1652542.
76%
#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").
76%
#1633298 nodejs plugin never runs install during pull snapcraft (launchpad) closed Bug where the nodejs plugin skipped npm install during pull (builddir check always false) was fixed by merged PR snapcore/snapcraft#936 (commit 0497daaac), which installs dependencies during pull.
70%