-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[BUG] npm install removes peer dependency #3280
Copy link
Copy link
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releaseWontfixthis will not be worked onthis will not be worked on
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
npm i --save ... removes related peer dependency.
Expected Behavior
npm i --save ... does not remove peer dependencies.
Steps To Reproduce
Existing package.json:
"dependencies": {
"@my-org/my-pkg": "^1.0.0"
},
"peerDependencies": {
"@my-org/my-pkg": "^1.0.0",
"some-other-pkg": "^2.3.4"
}Running npm i --save @my-org/my-pkg@1.0.1 results in the following package.json:
"dependencies": {
"@my-org/my-pkg": "^1.0.1"
},
"peerDependencies": {
"some-other-pkg": "^2.3.4"
}Note that the peer dependency "@my-org/my-pkg": "^1.0.1" was removed during install.
Environment
- OS: Manjaro 21.0.5
- Node: 12.19.1
- npm: 7.14.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releaseWontfixthis will not be worked onthis will not be worked on