Skip to content

fix(pm): check npm lockfile without reinstalling for --frozen-lockfile --lockfile-only - #3518

Merged
fengmk2 merged 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/fix-npm-frozen-lockfile-only
Nov 21, 2026
Merged

fengmk2 merged 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/fix-npm-frozen-lockfile-only

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

The current vp install --frozen-lockfile --lockfile-only on npm drops --lockfile-only and runs a plain npm ci, which removes node_modules, reinstalls dependencies, and runs lifecycle scripts.

With npm 11.16.0 or later, the combination runs npm ci --dry-run --ignore-scripts. It checks that the lockfile agrees with package.json and preserves the installed dependencies.

npm 10.5.1 stopped clearing node_modules during dry runs. npm 11.16.0 also stopped writing node_modules/.package-lock.json, which could make a later install skip a needed update. Vite+ rejects this flag combination when npm is older or its version is unknown. npm/cli#9417

🤖 Generated with Claude Code and Codex

@liangmiQwQ
liangmiQwQ marked this pull request as ready for review November 21, 2026 06:58

@liangmiQwQ liangmiQwQ left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

✅ Passed review in the Codex app using GPT-6.2 Astra Max.

@fengmk2 fengmk2 self-assigned this Nov 21, 2026
@fengmk2
fengmk2 merged commit 92f6e0f into voidzero-dev:main Nov 21, 2026
82 checks passed
@fengmk2 fengmk2 mentioned this pull request Nov 23, 2026
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.

3 participants