Yarn: Suggestion: command to check unmet peer dependencies

Created on 30 Sep 2017  路  5Comments  路  Source: yarnpkg/yarn

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.

Most helpful comment

Here are my two workarounds:

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

Both reinstall all packages and trigger postinstall

All 5 comments

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

I do the same :D

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.

@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.

Here are my two workarounds:

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

Both reinstall all packages and trigger postinstall

Was this page helpful?
0 / 5 - 0 ratings