-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issue
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 i <dependency name> succeeds with exit code 0 but the resultant dependency is not present, if <dependency name> is an untracked (not included in prod or dev dependencies) optional peer dependency.
I believe this is caused by #8431.
Expected Behavior
npm i <dependency name> should always install the dependency if the dependency has no version incompatibility issues.
Steps To Reproduce
Easiest way to see this is working in the mongodb package, because this scenario arose in our CI.
- Clone node-mongodb-native.
- run
npm i - install
kerberos:npm i kerberos - attempt to use kerberos: `node -p "require('kerberos')":
node:internal/modules/cjs/loader:1408
throw err;
^
Error: Cannot find module 'kerberos'
Environment
- npm: 11.5.0+
- Node.js: doesn't matter
- OS Name: doesn't matter
- System Model Name: doesn't matter
- npm config: doesn't matter
raviqqe, vsn4ik and dahaupt
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issue