-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing peer dependencies after installation of pnpm v6.24.4 #4183
Comments
also got the same issues |
Install the missing peer dependencies. The list is even printed. You can copy the list from the
|
I saw the list zkochan. However, more importantly, what has change in your code-base to cause this? I never had to install any Peer dependencies before, and this occurred without a major (BREAKING) upgrade. I avoid jquery. I don't use react or babel or vue. Yet I have to install these! |
The only thing that has changed is that we print this warnings in a hierarchical view. In the past these warnings were printed as plain test and when there were many issues, we only printed the first 5 or so. |
Why does pnpm fails to parse the caret (^) and ~ symbols?
|
Might be a terminal issue. Try |
Thanks. That works. |
this doesn't resolve the issues because it forces us to install something that we doesn't actually use like @st-clair-clarke said. |
@zkochan is there any way to ignore the warning on the terminal? |
Currently the only way would be to do something like this in Lines 7 to 12 in 3d6ebd6
Maybe we should add some settings to control what peer dependency issues should be ignored. |
I agree with your suggestion @zkochan that a setting is needed to control what peer dependencies should be ignored. The suggested solution using .pnpmfile.cjs again forces us to manually add a list of if statements. I corrected the peer dependencies initially flagged, BUT others now appear with warnings, requesting that I even downgrade my typescript and @angular/* packages that are current! This is a real issue. Hope we can resolve it. I am still wondering the reason why these console output started. I have never seen any such in pnpm before my upgrade. |
we got the same issues :( |
We can add a new setting to the {
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": ["babel-loader"],
"allowedVersions": {
"@angular/common": "13"
}
}
}
} cc @pnpm/collaborators |
First I think most people don't know what
and @st-clair-clarke said
Actually, peerDependency is required from dependency you have already installed, but it requires some more dependencies installed above itself in the dependency tree. For example, if you install Back to this issue, what @zkochan done in recent pnpm update is making peerDependency warnings more clear and detailed, thus users start feeling this comes up from nowhere but in fact this warning actually has been printing out with limited line for a long time. As for warning in human words, you are using If your project works fine with these warnings, this means you may in following lucky conditions
Preferably those warning should be solved by dependency update, add missing ones, or package owner writes correct peerDependencies. In this way, you have a certainty of your project's dependency and higher quality. And for new settings, |
isn't {
"peerDependenciesMeta": {
"babel-loader": {
"optional": true
}
}
} |
no,
No, |
Oh sorry, I missed it. In this case, adding |
Actually I really like the idea with package selectors in What do you think about being able to express in "pnpm.rules" all the functionality we have in {
"pnpm": {
"rules": {
"qar@1>zoo::dev": "2", // replace or add `zoo@2` to devDependencies of qar@1
"foo>babel-loader::dep": null, // delete babel-loader from dependencies of foo
"baz>react::peer": "^16" // fix peer dependency of baz to be "^16" and e.g. not "^15"
// some syntax for making peer dep optional
}
}
} |
I don't think we have much choice as these are fields that are already implemented in both or one of npm/Yarn. |
Would this only be settable in the package.json of your project or can dependencies set this as well? As an example:
React 17 is released and A and B upgrade. Can B update its package.json to say indicate that react@17 is ok for C? This lets any library author indicate they know better than what their dependency says and allows this knowledge to scale up. |
Fix using .npmrc file |
pnpm version:
6.24.4
Code to reproduce the issue:
pnpm add [npm package]
eg pnpm add lauqe
Expected behavior:
Actual behavior:
Additional information:
node -v
prints: 16.13.0The application installation completes normally.
The text was updated successfully, but these errors were encountered: