Vue-cli: Peer Dep Missing Error When use "npm list -g"

Created on 10 Oct 2020  路  10Comments  路  Source: vuejs/vue-cli

Version

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/[email protected] requires a peer of [email protected] 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

Most helpful comment

NPM incorrectly hoisted the dependencies from vue-codemod, putting vue@3 & @vue/compiler-sfc at different levels of the dependency tree, thus the warning. We'll try to find a workaround.

All 10 comments

I also encountered this situation

NPM incorrectly hoisted the dependencies from vue-codemod, putting vue@3 & @vue/compiler-sfc at different levels of the dependency tree, thus the warning. We'll try to find a workaround.

NPM incorrectly hoisted the dependencies from vue-codemod, putting vue@3 & @vue/compiler-sfc at different levels of the dependency tree, thus the warning. We'll try to find a workaround.

So all we need to do is wait for a subsequent version update to fix the issue, right?

image

Same problem on windows 10 here.

+-- @vue/[email protected]
+-- [email protected]
`-- [email protected]

npm ERR! peer dep missing: [email protected], required by @vue/[email protected]

Same Here
image

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.

Damn it now another problem... was working fine yesterday until I updated.

npm ERR! code ECONNRESET
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

Edit:

Never mind, forget it. This happens after running http-server package and trying to install @vue/cli.

Must always close the command prompt if I run http-server before I install @vue/cli again. Latest/Current nodejs 15.1.0 and npm 7.0.8 works fine when installing. Just do NOT install @vue/cli after exiting http-server.

I have the same issue but I don't want to use the latest node version but latest LTS. Until now I was unable to fix the issue. I also tried to clear npm cache with npm cache clean -f but with no results.

NPM incorrectly hoisted the dependencies from vue-codemod, putting vue@3 & @vue/compiler-sfc at different levels of the dependency tree, thus the warning. We'll try to find a workaround.

C:\npm list -g --depth 0
C:\Users\Administrator\AppData\Roaming\npm
+-- @vue/[email protected]
`-- [email protected]

npm ERR! peer dep missing: [email protected], required by @vue/[email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments

jgribonvald picture jgribonvald  路  3Comments

eladcandroid picture eladcandroid  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments

Gonzalo2683 picture Gonzalo2683  路  3Comments