Skip to content
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

Suggestion: command to check unmet peer dependencies #4594

Closed
OliverJAsh opened this issue Sep 30, 2017 · 10 comments
Closed

Suggestion: command to check unmet peer dependencies #4594

OliverJAsh opened this issue Sep 30, 2017 · 10 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@OliverJAsh
Copy link

I get unmet peer dependency warnings when running yarn, but only sometimes.

I want a command to reliably check unmet peer dependencies. I had hoped yarn check would do this, but it seems not.

@connorjclark
Copy link

How can this be done? I currently delete node_modules/ and then do a yarn install. Better way?

@stefanKuijers
Copy link

I do the same :D

@SirUppyPancakes
Copy link

I currently run yarn upgrade, seems to be faster than yarn install. This works well in combination with yarn outdated to easily assert my packages are up to date and not missing any dependencies.

@galvarez421
Copy link

@hoten I think one easier workaround is to change the version of a single package in package.json, e.g., change Bootstrap from 3.3.5 to 3.3.7 and then run yarn. This should cause Yarn to link dependencies and display incorrect and unmet peer dependencies. Then just revert the version and run yarn again.

@DimitarNestorov
Copy link
Contributor

Here are my two workarounds:

  1. yarn install --check-files
  2. rm node_modules/.yarn-integrity && yarn

Both reinstall all packages and trigger postinstall

@Jelledb
Copy link

Jelledb commented Jan 20, 2021

In the end, I only have to run yarn install --check-files. I can do this multiple times in sequence and it still works every time.

@merceyz
Copy link
Member

merceyz commented Jan 20, 2021

Closing as fixed in v2 where the peer dependency warnings are always printed on install

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 20, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 20, 2021
@fzyzcjy
Copy link

fzyzcjy commented Feb 8, 2022

In the end, I only have to run yarn install --check-files. I can do this multiple times in sequence and it still works every time.

does not work for me :( the second time running it reports zero problems (though there are some)

@ColmBhandal
Copy link

@hoten I think one easier workaround is to change the version of a single package in package.json

This is the only thing that works for me so far out of what I've tried. If you have any dependencies with versions starting with the hat "^" it suffices to remove the hat e.g. you could change this:

"typescript": "^4.3.5"

To this:

"typescript": "4.3.5"

And then revert. Or if you don't have a hat, you could add a hat. And then revert.

@mxdvl
Copy link

mxdvl commented Jan 12, 2023

In the end, I only have to run yarn install --check-files. I can do this multiple times in sequence and it still works every time.

does not work for me :( the second time running it reports zero problems (though there are some)

I’ve had good success with yarn --force!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests