Skip to content

Commit 74145dd

Browse files
rfgamaralclaude
andauthored
fix: Reorder npm upgrade to prevent lock file sync errors (#143)
This change ensures npm is upgraded AFTER installing dependencies rather than before. Upgrading npm before running npm ci causes package-lock.json sync errors that prevent successful dependency installation. The issue occurs because different npm versions may use different lock file formats. When npm is upgraded before dependencies are installed, the subsequent npm ci command detects a format mismatch and fails with: "npm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync." Testing confirmed this order resolves the issue: 1. Install dependencies with current npm version (works) 2. Upgrade npm to latest (maintains lock file compatibility) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 446b63e commit 74145dd

File tree

2 files changed

+1455
-959
lines changed

2 files changed

+1455
-959
lines changed

.github/workflows/core-deploy.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ jobs:
5555
registry-url: https://registry.npmjs.org/
5656
scope: '@doist'
5757

58-
- name: Ensure npm 11.5.1 or later is installed
59-
run: npm install -g npm@latest
60-
6158
- name: Install dependencies
6259
run: npm run bootstrap-ci:common
6360

61+
# npm must be upgraded AFTER installing dependencies to avoid package-lock.json
62+
# sync errors. Upgrading npm before running npm ci can cause lock file format
63+
# mismatches that prevent successful dependency installation.
64+
- name: Ensure npm 11.5.1 or later is installed
65+
run: npm install -g npm@latest
66+
6467
- name: Publish package
6568
working-directory: ./packages/ui-extensions-core
6669
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)