Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue cli generates project with vue 3.0.5, but with typescript ~3.9.3 #6299

ghost opened this issue Feb 20, 2021 · 1 comment

Vue cli generates project with vue 3.0.5, but with typescript ~3.9.3 #6299

ghost opened this issue Feb 20, 2021 · 1 comment


Copy link

ghost commented Feb 20, 2021



Reproduction link

Environment info

Environment Info:

    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
    Node: 12.18.0 - C:\WS\tools\node-v12.18.0-win-x64\node.EXE
    Yarn: Not Found
    npm: 6.14.4 - C:\WS\tools\node-v12.18.0-win-x64\npm.CMD
    Chrome: 88.0.4324.182
    Edge: Spartan (44.18362.449.0)
    @vue/cli: Not Found

Steps to reproduce

From minimal reproduction repo:

  • Run npm install
  • Run npm run build

Project creation steps:

  • Run "vue create"
  • Select "Manually select features"
  • "Choose Vue version" is checked
  • "Babel" is checked
  • "Typescript" is checked
  • "Linter / Formatter" is checked
  • Proceed
  • Select "3.x (Preview)"
  • Use class-style component syntax? => N
  • Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? => Y
  • Select "ESLint with error prevention only"
  • "Lint on save" is checked
  • Proceed
  • Select "In dedicated config files"
  • "Save this as a preset for future projects?" => N

What is expected?

Build is successful. No errors.

What is actually happening?

ERROR Failed to compile with 1 error 3:34:15:34

error in src/App.vue:21:22

TS2345: Argument of type 'object | Ref | ComputedRef | (() => unknown)' is not assignable to parameter of type 'string'.
Type 'object' is not assignable to type 'string'.
19 |
20 | watch([simpleRef1, simpleRef2], ([newString1, newString2]) => {

21 | consumeStrings(newString1, newString2)
| ^^^^^^^^^^
22 | })
23 | }
24 | });

ERROR Build failed with errors.

This error is coming from the fact that project has been generated with vue 3.0.5 and typescript 3, while vue 3.0.5 requires typescript 4.

Note: I'm not looking for how it can be fixed for this project, I'm looking for Vue Cli to generate project with consistent dependencies so it will work out of the box.

Copy link

sodatea commented Mar 17, 2021

Fixed in 4.5.12

@sodatea sodatea closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant