-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Discussionis pending a discussionis pending a discussionPriority 2secondary priority issuesecondary priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When installing a new package with npm i <package_name>
, if the package already exist as sub-dependencie of another package, it will install that version of the package (example 13.5.3). Instead of installing latest version (example 15.4.3). If that is a design choice, I find it counter-intuitive and hard to debug.
Expected Behavior
npm init
npm i @storybook/components
npm i react-syntax-highlighter
Should give me:
{
"dependencies": {
"@storybook/components": "^6.2.9",
"react-syntax-highlighter": "^15.4.3"
}
}
Doing npm i <package_name>
when the package is absent from package.json
should install the latest version by default of that package, ignoring smaller versions installed as sub-dependencie of other installed packages.
Steps To Reproduce
npm init
npm i react-syntax-highlighter
{
"dependencies": {
"react-syntax-highlighter": "^15.4.3"
}
}
I have the latest version, hourra !
npm init
npm i @storybook/components
npm i react-syntax-highlighter
{
"dependencies": {
"@storybook/components": "^6.2.9",
"react-syntax-highlighter": "^13.5.3"
}
}
Why do I have 13.5.3
version ? It seem to be the same version as the one used by @storybook/components
internally.
Environment
- OS: Window 10
- Node: v14.16.1
- npm: 7.10.0
brandones
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Discussionis pending a discussionis pending a discussionPriority 2secondary priority issuesecondary priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release