vuejs / vue-cli

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

vue upgrade --next not working for 2.x to 3.x transition #5969

Open ivansieder opened 4 years ago

ivansieder commented 4 years ago

Version

4.5.7

Environment info

Environment Info:

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
  Binaries:
    Node: 14.12.0 - ~/.nvm/versions/node/v14.12.0/bin/node
    Yarn: Not Found
    npm: 6.14.8 - ~/.nvm/versions/node/v14.12.0/bin/npm
  Browsers:
    Chrome: 86.0.4240.75
    Firefox: 81.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-helper-vue-transform-on:  1.0.0-rc.2 
    @vue/babel-plugin-jsx:  1.0.0-rc.3 
    @vue/babel-plugin-transform-vue-jsx:  1.1.2 
    @vue/babel-preset-app:  4.5.7 
    @vue/babel-preset-jsx:  1.1.2 
    @vue/babel-sugar-functional-vue:  1.1.2 
    @vue/babel-sugar-inject-h:  1.1.2 
    @vue/babel-sugar-v-model:  1.1.2 
    @vue/babel-sugar-v-on:  1.1.2 
    @vue/cli-overlay:  4.5.7 
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.7 
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.7 
    @vue/cli-plugin-router:  4.5.7 
    @vue/cli-plugin-typescript: ~4.5.0 => 4.5.7 
    @vue/cli-plugin-vuex:  4.5.7 
    @vue/cli-service: ~4.5.0 => 4.5.7 
    @vue/cli-shared-utils:  4.5.7 
    @vue/component-compiler-utils:  3.2.0 
    @vue/eslint-config-typescript: ^5.0.2 => 5.1.0 
    @vue/preload-webpack-plugin:  1.1.2 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^6.2.2 => 6.2.2 
    typescript: ~3.9.3 => 3.9.7 
    vue: ^2.6.11 => 2.6.12 
    vue-eslint-parser:  7.1.1 
    vue-hot-reload-api:  2.3.4 
    vue-loader:  15.9.3 (16.0.0-beta.8)
    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.7

Steps to reproduce

What is expected?

As far as I understood from https://v3.vuejs.org/guide/installation.html#cli it should upgrade to the latest vue 3 release.

What is actually happening?

The following output gets returned: ✔ Gathering package information... DONE Seems all plugins are up to date. Good work!

ivansieder commented 4 years ago

Tried clearing the node cache, without success.

ivansieder commented 4 years ago

ooooh I see, probably because 3.x isn't RC anymore. If that's the case, is there a different possible migration path? AFAICT, https://v3.vuejs.org/guide/migration/introduction.html only talks about how to create new Vue 3 apps.

haoqunjiang commented 4 years ago

I think that part of the documentation may have misled you 😅 The instruction is for upgrading Vue CLI-related dependencies in a Vue CLI project to the latest 4.5.x release, so that it can compile Vue 3 components. It's not meant for Vue 2 -> Vue 3 migration. (We may add that functionality later, though)

ivansieder commented 4 years ago

Oooh I see, thank you. That's a whole new level of fail. I guess i mixed it up with https://github.com/vuejs/vue-cli-plugin-vue-next.

So for now, the migration way is to probably create a new Vue 3 project and copy the packages and settings over to the Vue 2 project, right?

haoqunjiang commented 4 years ago

Yes, that's right.