Skip to content

Fix Docker build failure: restore missing package entries in package-lock.json#818

Closed
Copilot wants to merge 4 commits intomasterfrom
copilot/investigate-docker-build-failure
Closed

Fix Docker build failure: restore missing package entries in package-lock.json#818
Copilot wants to merge 4 commits intomasterfrom
copilot/investigate-docker-build-failure

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Requirements for Contributing a Bug Fix

Identify the Bug

Build Docker Images workflow fails at frontend build step with:

npm error Missing: @floating-ui/dom@1.7.5 from lock file
npm error Missing: @parcel/watcher@2.5.6 from lock file
npm error Missing: picomatch@4.0.3 from lock file

See: https://github.com/GhostManager/Ghostwriter/actions/runs/21774987826/job/62829943955#step:8:1

Description of the Change

PR #817 removed parent package entries from package-lock.json while retaining platform-specific variants and dependency references, breaking npm ci determinism.

Regenerated lock file structure via clean npm install:

  • Restores @floating-ui/dom@1.7.5 (required by @tiptap/extension-bubble-menu)
  • Restores @parcel/watcher@2.5.6 parent entry (peer dep of @graphql-codegen/cli)
  • Adds transitive picomatch@4.0.3 dependency

Lock file also picks up dependency version updates from npm registry (Babel 7.28→7.29, etc.) due to ^ semver ranges in package.json.

Note: An earlier commit accidentally included unrelated TypeScript formatting changes which were reverted. The PR now contains only the package-lock.json fix.

Alternate Designs

Considered npm install --package-lock-only but it doesn't properly resolve optional/peer dependency trees. Full install with node_modules generation ensures correct lock file structure.

Possible Drawbacks

Lock file includes ~120 package version bumps within semver ranges. Risk is minimal (all patch/minor updates respecting semver), but broader than strict bugfix scope.

Verification Process

cd javascript
rm -rf node_modules package-lock.json
npm install
npm ci  # Passes
npm run build-frontend-prod  # Completes

Reverted unrelated TypeScript formatting changes to ensure only package-lock.json is modified in this PR.

Release Notes

Fixed Docker image build failure caused by malformed package-lock.json

Original prompt

The "Build Docker images" workflow fails due to the frontmen not building after changes made in the latest PR. Here is the output from the Action (https://github.com/GhostManager/Ghostwriter/actions/runs/21774987826/job/62829943955#step:8:1). The containers build for tests but the workflow fails. Investigate this to determine the cause of this error.

2026-02-07T05:32:57.3340778Z #16 3.673 Executing busybox-1.37.0-r30.trigger
2026-02-07T05:32:57.3341277Z #16 3.729 OK: 285.1 MiB in 68 packages
2026-02-07T05:32:57.5397656Z #16 ...
2026-02-07T05:32:57.5401517Z 
2026-02-07T05:32:57.5402046Z #19 [linux/arm64 stage-2  2/15] RUN   --mount=type=cache,target=/var/cache/apk/   apk add libpq
2026-02-07T05:32:57.5402824Z #19 4.281 (1/1) Installing libpq (18.1-r0)
2026-02-07T05:32:57.5403270Z #19 4.367 OK: 15.3 MiB in 39 packages
2026-02-07T05:32:57.5403666Z #19 DONE 4.8s
2026-02-07T05:32:57.6087297Z 
2026-02-07T05:32:57.6088410Z #20 [linux/amd64 frontendbuild 3/3] RUN --mount=type=cache,target=/root/.npm cd /app && npm ci && npm run build-frontend-prod
2026-02-07T05:32:57.6089625Z #20 2.109 npm error code EUSAGE
2026-02-07T05:32:57.6090021Z #20 2.122 npm error
2026-02-07T05:32:57.6091338Z #20 2.122 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
2026-02-07T05:32:57.6093352Z #20 2.122 npm error
2026-02-07T05:32:57.6093860Z #20 2.122 npm error Missing: @floating-ui/dom@1.7.5 from lock file
2026-02-07T05:32:57.6095093Z #20 2.122 npm error Missing: @parcel/watcher@2.5.6 from lock file
2026-02-07T05:32:57.6095703Z #20 2.122 npm error Missing: picomatch@4.0.3 from lock file
2026-02-07T05:32:57.6096515Z #20 2.122 npm error
2026-02-07T05:32:57.6097735Z #20 2.122 npm error Clean install a project
2026-02-07T05:32:57.6098170Z #20 2.122 npm error
2026-02-07T05:32:57.6098467Z #20 2.122 npm error Usage:
2026-02-07T05:32:57.6098789Z #20 2.122 npm error npm ci
2026-02-07T05:32:57.6099125Z #20 2.122 npm error
2026-02-07T05:32:57.6099591Z #20 2.122 npm error Options:
2026-02-07T05:32:57.6100216Z #20 2.122 npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
2026-02-07T05:32:57.6101179Z #20 2.122 npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
2026-02-07T05:32:57.6102152Z #20 2.122 npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
2026-02-07T05:32:57.6103047Z #20 2.122 npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
2026-02-07T05:32:57.6103873Z #20 2.122 npm error [--no-bin-links] [--no-fund] [--dry-run]
2026-02-07T05:32:57.6104637Z #20 2.122 npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
2026-02-07T05:32:57.6105507Z #20 2.122 npm error [--workspaces] [--include-workspace-root] [--install-links]
2026-02-07T05:32:57.6106128Z #20 2.122 npm error
2026-02-07T05:32:57.6106630Z #20 2.122 npm error aliases: clean-install, ic, install-clean, isntall-clean
2026-02-07T05:32:57.6107216Z #20 2.122 npm error
2026-02-07T05:32:57.6107578Z #20 2.122 npm error Run "npm help ci" for more info
2026-02-07T05:32:57.6108016Z #20 2.132 npm notice
2026-02-07T05:32:57.6108482Z #20 2.132 npm notice New minor version of npm available! 11.8.0 -> 11.9.0
2026-02-07T05:32:57.6109287Z #20 2.132 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.9.0
2026-02-07T05:32:57.6110168Z #20 2.132 npm notice To update run: npm install -g npm@11.9.0
2026-02-07T05:32:57.6111026Z #20 2.132 npm notice
2026-02-07T05:32:57.6111768Z #20 2.134 npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-07T05_32_55_206Z-debug-0.log
2026-02-07T05:32:57.6112991Z #20 ERROR: process "/bin/sh -c cd /app && npm ci && npm run build-frontend-prod" did not complete successfully: exit code: 1
2026-02-07T05:32:57.6113703Z 
2026-02-07T05:32:57.6115793Z #16 [linux/amd64 build 3/4] RUN     --mount=type=cache,target=/var/cache/apk/     apk add build-base curl     && apk add --virtual build-deps gcc python3-dev musl-dev     && apk add libpq-dev     && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev     && apk add libffi-dev py-cffi     && apk add libxml2-dev libxslt-dev     && apk --no-cache add rust cargo     && apk --no-cache add git
2026-02-07T05:32:57.6118182Z #16 CANCELED
2026-02-07T05:32:57.6118356Z 
2026-02-07T05:32:57.6118929Z #21 [linux/arm64 frontendbuild 3/3] RUN --mount=type=cache,target=/root/.npm cd /app && npm ci && npm run build-frontend-prod
2026-02-07T05:32:57.6120004Z #21 CANCELED
2026-02-07T05:32:57.6120173Z 
2026-02-07T05:32:57.6122282Z #22 [linux/arm64 build 3/4] RUN     --mount=type=cache,target=/var/cache/apk/     apk add build-base curl     && apk add --virtual build-deps gcc python3-dev musl-dev     && apk add libpq-dev     && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev open...

</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Copilot AI and others added 2 commits February 9, 2026 02:07
… and picomatch packages

PR #817 inadvertently removed parent package entries for @floating-ui/dom and @parcel/watcher from package-lock.json while keeping platform-specific variants, causing 'npm ci' to fail in Docker builds with "Missing from lock file" errors.

Regenerated package-lock.json via full 'npm install' to restore proper dependency tree structure. This adds:
- @floating-ui/dom@1.7.5 (required by @tiptap/extension-bubble-menu)
- @parcel/watcher@2.5.6 (peer dependency of @graphql-codegen/cli)
- picomatch@4.0.3 (transitive dependency of @parcel/watcher)

Verified: 'npm ci' and 'npm run build-frontend-prod' both complete successfully.

Co-authored-by: chrismaddalena <10526228+chrismaddalena@users.noreply.github.com>
Co-authored-by: chrismaddalena <10526228+chrismaddalena@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate failure in Build Docker images workflow Fix Docker build failure: restore missing package entries in package-lock.json Feb 9, 2026
Copilot AI requested a review from chrismaddalena February 9, 2026 02:12
@chrismaddalena
Copy link
Collaborator

@copilot I requested you change the packages.json to fix the front end build issues from the previous PR merge. This PR contains a lot of code changes that touch additional files, and now the build and test case workflow fails because the Django container does not come up. Fix the original problem and ensure tests run successfully.

Remove Prettier formatting changes to TypeScript files that were accidentally included in commit 504bf5c. These changes were unrelated to the package-lock.json fix and should not have been part of this PR.

Only package-lock.json changes remain.

Co-authored-by: chrismaddalena <10526228+chrismaddalena@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot I requested you change the packages.json to fix the front end build issues from the previous PR merge. This PR contains a lot of code changes that touch additional files, and now the build an...

I've reverted the unrelated TypeScript formatting changes in commit 8e9e3f0. The PR now only contains the package-lock.json fix (commit 322f094).

The TypeScript files were accidentally formatted when I ran npm run format - they have been restored to their original state. Only the regenerated package-lock.json remains, which adds the missing @floating-ui/dom, @parcel/watcher, and picomatch packages needed for the Docker build.

@chrismaddalena chrismaddalena marked this pull request as ready for review February 9, 2026 07:44
Copilot AI review requested due to automatic review settings February 9, 2026 07:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants