← All tasks
javascriptvuejs/vue-cli #6270Not a task: not reproduced

peer dependency confilct when creating projects using vue 2 on npm 7

envgap__vuejs__vue-cli-6270

Original GitHub issue ↗Opened 2021-02-08

01 / FAILURE SIGNATURE

As reported upstream

receive an error says "ERESOLVE unable to resolve dependency tree"
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

vuejs/vue-cli #6270 · read the original issue
### Version

4.5.11



### Environment info

```

 System:

    OS: Linux 5.4 Ubuntu 18.04.4 LTS (Bionic Beaver)

    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

  Binaries:

    Node: 12.17.0 - /usr/local/bin/node

    Yarn: 1.22.5 - /usr/bin/yarn

    npm: 7.5.2 - ~/npm-global/bin/npm

  Browsers:

    Chrome: Not Found

    Firefox: Not Found

  npmPackages:

    @vue/babel-helper-vue-jsx-merge-props:  1.2.1

    @vue/babel-helper-vue-transform-on:  1.0.2

    @vue/babel-plugin-jsx:  1.0.3

    @vue/babel-plugin-transform-vue-jsx:  1.2.1

    @vue/babel-preset-app:  4.5.11

    @vue/babel-preset-jsx:  1.2.4

    @vue/babel-sugar-composition-api-inject-h:  1.2.1

    @vue/babel-sugar-composition-api-render-instance:  1.2.4

    @vue/babel-sugar-functional-vue:  1.2.2

    @vue/babel-sugar-inject-h:  1.2.2

    @vue/babel-sugar-v-model:  1.2.3

    @vue/babel-sugar-v-on:  1.2.3

    @vue/cli-overlay:  4.5.11

    @vue/cli-plugin-babel: ~4.5.0 => 4.5.11

    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.11

    @vue/cli-plugin-router:  4.5.11

    @vue/cli-plugin-vuex:  4.5.11

    @vue/cli-service: ~4.5.0 => 4.5.11

    @vue/cli-shared-utils:  4.5.11

    @vue/component-compiler-utils:  3.2.0

    @vue/preload-webpack-plugin:  1.1.2

    @vue/web-component-wrapper:  1.2.0

    eslint-plugin-vue: ^6.2.2 => 6.2.2

    vue: ^2.6.11 => 2.6.12

    vue-eslint-parser:  7.4.1

    vue-hot-reload-api:  2.3.4

    vue-loader:  15.9.6 (16.1.2)

    vue-style-loader:  4.1.2

    vue-template-compiler: ^2.6.11 => 2.6.12

    vue-template-es2015-compiler:  1.9.1

  npmGlobalPackages:

    @vue/cli: 4.5.11

```



### Steps to reproduce

Run



```

vue create project_name

```



to create a vue project and then choose vue 2. Then



```

cd project_name && npm update

```



### What is expected?

Dependencies updated



### What is actually happening?

receive an error says "ERESOLVE unable to resolve dependency tree"



Detail:



```

$ npm update         

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR! 

npm ERR! While resolving: project_name@0.1.0

npm ERR! Found: vue@2.6.12

npm ERR! node_modules/vue

npm ERR!   vue@"^2.6.11" from the root project

npm ERR! 

npm ERR! Could not resolve dependency:

npm ERR! peer vue@"3.0.5" from @vue/compiler-sfc@3.0.5

npm ERR! node_modules/@vue/compiler-sfc

npm ERR!   peerOptional @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/cli-service@4.5.11

npm ERR!   node_modules/@vue/cli-service

npm ERR!     dev @vue/cli-service@"~4.5.0" from the root project

npm ERR!     1 more (@vue/cli-plugin-babel)

npm ERR! 

npm ERR! Fix the upstream dependency conflict, or retry

npm ERR! this command with --force, or --legacy-peer-deps

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

```



---

`peerDependenciesMeta` used in @vue/cli-service causes unexpected behavior on npm 7



<!-- generated by vue-issues. DO NOT REMOVE -->
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

misspecification
Label rules and the text that matched
[
  {
    "category": "misspecification",
    "rule": "signature.unresolvable_declared_requirement",
    "source": "failure_signature",
    "excerpt": "receive an error says \"ERESOLVE unable to resolve dependency tree\""
  }
]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.