vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

Vue CLI + Typescript results in "conflicting versions for project dependency "typescript" #6851

Open lloydjatkinson opened 2 years ago

lloydjatkinson commented 2 years ago

Version

4.5.15

Reproduction link

github.com/vuejs/vue-cli

Environment info

Environment Info:

  System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  Binaries:
    Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 96.0.4664.45
    Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.29)
  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.1.1
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  4.5.15
    @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.15
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.15
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.15
    @vue/cli-plugin-router:  4.5.15
    @vue/cli-plugin-typescript: ~4.5.0 => 4.5.15
    @vue/cli-plugin-unit-jest: ~4.5.0 => 4.5.15
    @vue/cli-plugin-vuex: ~4.5.0 => 4.5.15
    @vue/cli-service: ~4.5.0 => 4.5.15
    @vue/cli-shared-utils:  4.5.15
    @vue/compiler-core:  3.2.22
    @vue/compiler-dom:  3.2.22
    @vue/compiler-sfc: ^3.0.0 => 3.2.22
    @vue/compiler-ssr:  3.2.22
    @vue/component-compiler-utils:  3.3.0
    @vue/devtools-api:  6.0.0-beta.20.1
    @vue/eslint-config-airbnb: ^5.0.2 => 5.3.0
    @vue/eslint-config-typescript: ^7.0.0 => 7.0.0
    @vue/preload-webpack-plugin:  1.1.2
    @vue/reactivity:  3.2.22
    @vue/ref-transform:  3.2.22
    @vue/runtime-core:  3.2.22
    @vue/runtime-dom:  3.2.22
    @vue/server-renderer:  3.2.22
    @vue/shared:  3.2.22
    @vue/test-utils: ^2.0.0-0 => 2.0.0-rc.17
    @vue/web-component-wrapper:  1.3.0
    eslint-plugin-vue: ^7.0.0 => 7.20.0
    jest-serializer-vue:  2.0.2
    typescript: ~4.1.5 => 4.1.6
    vue: ^3.0.0 => 3.2.22
    vue-eslint-parser:  7.11.0
    vue-hot-reload-api:  2.3.4
    vue-jest: ^5.0.0-0 => 5.0.0-alpha.10 (3.0.7)
    vue-loader:  15.9.8 (16.8.3)
    vue-style-loader:  4.1.3
    vue-template-es2015-compiler:  1.9.1
    vuex: ^4.0.0-0 => 4.0.2
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

WARN conflicting versions for project dependency "typescript":

Using newer version (~4.1.5), but this may cause build errors. 📦 Installing additional dependencies...

What is expected?

Correct versions of dependencies are used

What is actually happening?

Incorrect versions of dependencies used

ahnpnl commented 2 years ago

+1 I just got the same warnings today.

evanb2 commented 2 years ago

I also ran into this today, but running both the build and serve commands succeed without errors and the app loads in the browser. So not a roadblock at least.

hactesp commented 2 years ago

I think it could be throw error while running test. Because it from vue-jest plugin. Not sure but need to check it indepth