Peer Dep Missing Error When use "npm list -g"
See original GitHub issueVersion
4.5.7
Environment info
Environment Info:
System:
OS: Windows 10 10.0.20221
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Binaries:
Node: 12.18.1 - D:\Installation\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.8 - D:\Installation\nodejs\npm.CMD
Browsers:
Chrome: 86.0.4240.75
Edge: Spartan (44.20221.1000.0), Chromium (85.0.564.70)
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
When I use “npm list -g --depth 0”, @vue/cli throws a peer dep missing error just like this.
And I find that when I install @vue/cli, cli also returns a “@vue/compiler-sfc@3.0.0 requires a peer of vue@3.0.0 but none is installed” warning.
I don’t think this is a coincidence, as I have found that quite a few members of our team have the phenomenon.
What is expected?
Run Successful
What is actually happening?
Throw Error
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How to fix Npm missing peer dependency - Stack Overflow
I have mis-understood the meaning of the ^ in version ^2.2.3 . After reading this link, ^2.2.3 means >=2.2.3 <3.X . That's why...
Read more >validate-peer-dependencies - npm package - Snyk
Validate that the peerDependencies of a given package.json have been satisfied. For more information about how to use this package see README.
Read more >npm-ci
An easy way to do this is to run, for example, npm config set legacy-peer-deps=true --location=project and commit the .npmrc file to your...
Read more >npm-link
If set to true , and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure, even if...
Read more >npm-ls
The tree shown is the logical dependency tree, based on package dependencies, not the physical layout of your node_modules folder. When run as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NPM incorrectly hoisted the dependencies from
vue-codemod
, puttingvue@3
&@vue/compiler-sfc
at different levels of the dependency tree, thus the warning. We’ll try to find a workaround.I found the issue. You need to use latest nodejs (15.0.1) and npm. (7.0.3)
Don’t use the LTS or stable version.