-
Couldn't load subscription status.
- Fork 3.8k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
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
Peer dependencies written to package.json:
"ag-grid-community": "^34.1.1",
"ag-grid-enterprise": "^34.1.1",
"ag-grid-react": "^34.1.1"
versions resolved in package-lock.json:
"node_modules/ag-grid-community": {
"version": "34.1.1",
},
"node_modules/ag-grid-enterprise": {
"version": "34.1.1",
},
"node_modules/ag-grid-react": {
"version": "34.1.1",
}
Expected Behavior
Peer dependencies written to package.json:
"ag-grid-community": "^34.0.2",
"ag-grid-enterprise": "^34.0.2",
"ag-grid-react": "^34.0.2"
versions resolved in package-lock.json:
"node_modules/ag-grid-community": {
"version": "34.0.2",
},
"node_modules/ag-grid-enterprise": {
"version": "34.0.2",
},
"node_modules/ag-grid-react": {
"version": "34.0.2",
}
Steps To Reproduce
- Having package like below, lets call it
tab
{
"name": "tab",
"peerDependencies": {
"ag-grid-community": "~34.0.2",
"ag-grid-enterprise": "~34.0.2",
"ag-grid-react": "~34.0.2",
}
}
- In host
appproject, we would like to installtab,and required peerDependencies and more - Run
npm install tab random-package ag-grid-community ag-grid-enterprise ag-grid-react --save - See invalid packages being installed (see Current Behavior)
Console output:
npm warn Unknown project config "email". This will stop working in the next major version of npm.
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/ag-grid-community
npm warn ag-grid-community@"*" from the root project
npm warn 3 more (tab, ag-grid-enterprise, ag-grid-react)
npm warn
npm warn Could not resolve dependency:
npm warn peer ag-grid-community@"~34.0.2" from [email protected]
npm warn node_modules/tab
npm warn tab@"*" from the root project
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/ag-grid-enterprise
npm warn ag-grid-enterprise@"*" from the root project
npm warn 1 more (tab)
npm warn
npm warn Could not resolve dependency:
npm warn peer ag-grid-enterprise@"~34.0.2" from [email protected]
npm warn node_modules/tab
npm warn tab@"*" from the root project
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/ag-grid-react
npm warn ag-grid-react@"*" from the root project
npm warn 1 more (tab)
npm warn
npm warn Could not resolve dependency:
npm warn peer ag-grid-react@"~34.0.2" from [email protected]
npm warn node_modules/tab
npm warn tab@"*" from the root project
- Now, clear
package.json, removepackage-lock.jsonand removenode_modules - Run, note order changed,
tabis next toag-grid-*npm install tab ag-grid-community ag-grid-enterprise ag-grid-react random-package --save - Get expected result 🙏 (see Expected Behavior)
Console output:
npm warn Unknown project config "email". This will stop working in the next major version of npm.
Environment
- npm: 11.5.2
- Node.js: v22.18.0
- OS Name: macOS 15.6
- System Model Name: MacBook Pro 14-inch, Nov 2023
- npm config:
; copy and paste output from `npm config ls` hereMetadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps