← Back to issue list

npm plugin fails in the presence of `base-files`

View original Github issue

Metadata

Project
craft-parts
Number
#1001
Type
issue
State
open
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

npm plugin (and any part creating bin/lib dirs) conflicts with base-files' bin/lib symlinks at staging, breaking rockcraft pack. Triaged (internal ticket); prototype fix #1004 unmerged; maintainer re-asked reporter 10 days ago if still reproducible, awaiting reply.

Suggested action: keep open

Reason: The issue is triaged (internal ticket CRAFT-4071 created, bepri provided a broader nil-plugin reproduction) and a maintainer (cmatsuoka) re-engaged 10 days ago asking @tigarmo whether it is still a problem and how it was addressed, so it is actively under discussion and awaiting the reporter's reply (well under 6 months). The prototype fix craft-parts#1004 was closed unmerged and I found no fix in the npm plugin or executor, so there is no evidence it is resolved.

Impact: 55 Quick Win: 13.75 Staleness: 25 Complexity: 75 Confidence: 75 Support Request: 5

Issue body

### Bug Description See https://github.com/canonical/rockcraft/issues/790 . The issue seems to be that the `lib/` directory created by the npm plugin conflicts with the `lib` symlink to `usr/lib` created by base-files (same for `bin/` and `usr/bin`). ### To Reproduce Create a package.json file with these contents: ``` { "name": "app", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" }, "dependencies": { "cookie-parser": "~1.4.4", "debug": "~2.6.9", "express": "~4.16.1", "http-errors": "~1.6.3", "jade": "~1.11.0", "morgan": "~1.9.1" } } ``` Create the described rockcraft.yaml, and run `rockcraft pack`. It should give the following output: ``` Failed to stage: parts list the same file with different contents or permissions. Detailed information: Parts 'npm-part' and 'base-files-part' list the following files, but with different contents or permissions: bin lib Failed to execute rockcraft in instance. ``` ### part yaml ```shell name: demo title: demo version: '0.1' summary: summary description: lib dir issue demo base: bare build-base: ubuntu@24.04 platforms: amd64: parts: npm-part: plugin: npm npm-include-node: true npm-node-version: node source: . base-files-part: plugin: nil stage-packages: - base-files ``` ### Relevant log output ```shell 2025-01-31 10:30:03.451 :: 2025-01-31 10:30:03.122 craft_parts.errors.PartFilesConflict: Failed to stage: parts list the same file with different contents or permissions. 2025-01-31 10:30:03.451 :: 2025-01-31 10:30:03.122 Parts 'npm-part' and 'base-files-part' list the following files, but with different contents or permissions: 2025-01-31 10:30:03.451 :: 2025-01-31 10:30:03.122 bin 2025-01-31 10:30:03.451 :: 2025-01-31 10:30:03.122 lib ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 13.75
Staleness: 25
Complexity: 75
Confidence: 75
Support Request: 5
keep open npm plugin (and any part creating bin/lib dirs) conflicts with base-files' bin/lib symlinks at staging, breaking rockcraft pack. Triaged (internal ticket); prototype fix #1004 unmerged; maintainer re-asked reporter 10 days ago if still reproducible, awaiting reply.
qwen/qwen3.6-35b-a3b
Staleness: 10
Complexity: 40
Confidence: 85
Support Request: 5
keep open Staging conflict between npm plugin and base-files due to bin/lib directory clashes. Validated as a real bug with a linked Jira ticket, currently awaiting maintainer status update on a previous fix attempt.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 60
Confidence: 90
Support Request: 10
needs triage Bug where npm and nil plugins conflict with base-files during staging due to overlapping bin and lib directories. Unlabeled, inactive for over a year, awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 80
Support Request: 5
needs triage Staging conflict between npm/nil plugin directories and base-files symlinks. Reported over a year ago with clear reproduction steps, but lacks maintainer labels, assignment, or response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Staging fails when npm or nil plugin directories conflict with base-files bin and lib paths. Unlabeled, inactive for over a year, with an internal Jira ticket created but no active triage or assignment.

Update history

Date Change
updated
updated

Related work

  • Related To: craft-parts#1004 (confidence 90%)

    Prototype PR 'add option to use symlinks with the npm plugin' referenced by cmatsuoka; closed without merging, no code integrated.

  • Related To: rockcraft#790 (confidence 70%)

    Original upstream issue explicitly referenced in the body as the source of the bug report.

Related issues

Issue Project State Summary Similarity
#790 different contents or permissions error rockcraft open Rockcraft npm plugin with npm-include-node writes node_modules into /lib, colliding with a second part's libpq5_libs stage-packages, causing a 'different contents or permissions' merge error. No maintainer response in 587 days.
70%