[BUG] npm ci fails after npm i when bundledDependencies are present
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
npm install generates a package-lock.json that npm ci immediately rejects with hundreds of "Missing: X from lock file" errors.
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
npm error Missing: json-schema-to-ts@3.1.1 from lock file
npm error Missing: @babel/runtime@7.29.2 from lock file
npm error Missing: ts-algebra@2.0.0 from lock file
npm error Missing: @aws-cdk/toolkit-lib@1.16.0 from lock file
npm error Missing: @aws-cdk/cli-plugin-contract@2.182.2 from lock file
npm error Missing: @aws-cdk/cdk-assets-lib@1.4.5 from lock file
npm error Missing: @aws-cdk/cloud-assembly-api@2.1.1 from lock file
npm error Missing: @aws-cdk/cloudformation-diff@2.187.1 from lock file
npm error Missing: @aws-sdk/client-cloudformation@3.1043.0 from lock file
npm error Missing: @aws-cdk/cx-api@2.253.0 from lock file
... (310 missing entries total)
Expected Behavior
npm ci should succeed after npm install with no manual changes to package-lock.json.
Steps To Reproduce
echo '{"name":"repro","private":true,"devDependencies":{"@aws-amplify/data-construct":"^1.17.2"}}' > package.json
npm install # succeeds
npm ci # fails with 310 "Missing: X from lock file" errors
Environment
- npm: 10.9.7
- Node.js: v22.22.2
- OS Name: Debian container (standard nodejs devcontainer) on Debian
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal package.json reproduction and run npm install followed by npm ci, focusing on the bundledDependencies case. Compare the generated package-lock.json with npm ci's missing-dependency errors; done means npm ci succeeds immediately after npm install without manual lockfile edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100