I got a lot of unmet peer dependency errors during a project installation using yarn. And I didn't take a screenshot of those or anything. How do I see all those warning again? Is there a command for that?
Asked
Active
Viewed 4,440 times
12
-
I'd guess [`yarn list --depth=0`](https://classic.yarnpkg.com/en/docs/cli/list/) would show the missing peer dependencies again, `npm ls` certainly does. – jonrsharpe Nov 27 '20 at 14:34
-
That just lists all the dependencies, not the missing ones? I want the package names for which the peer dependency or any other warning was thrown? @jonrsharpe – Akhila Nov 27 '20 at 14:37
-
Ah interesting, when you run `npm ls` it does show any missing peers (see e.g. https://stackoverflow.com/a/63177495/3001761). Looks like there's an open feature request for this in Yarn: https://github.com/yarnpkg/yarn/issues/4594 – jonrsharpe Nov 27 '20 at 14:38
-
But I'm using yarn? – Akhila Nov 27 '20 at 14:39
-
Yes, I understand that, which is why I suggested `yarn list` because it's Yarn's equivalent of NPM's `npm ls`. – jonrsharpe Nov 27 '20 at 14:39
-
yarn list just shows all the dependencies! – Akhila Nov 27 '20 at 14:51
-
Yes you said that already. – jonrsharpe Nov 27 '20 at 14:52
-
Sorry I didn't read what you said in the end.. – Akhila Nov 27 '20 at 14:53
2 Answers
12
The following command works while using yarn
as the package manager:
yarn install --check-files

Ayan
- 8,192
- 4
- 46
- 51
4
This sort of worked for me: yarn --ignore-scripts --audit
.
I think it showed a few less warnings than when I ran a fresh install, but it is at least showing some of the previous warnings for me. I threw --ignore-scripts
in there because in Nx/Angular repos, you might have a lengthy ngcc
command set up in your package.json
. --audit
's main purpose is to actually show you how many vulnerabilities you have in your dependencies, but as a side-effect, it appears to be running whatever code shows the warnings. If there is a better solution, I'd also like to know.

Troy Weber
- 897
- 8
- 8