how to use vue-cli install the other vue version not latest

10,381

I am assuming this is because you have installed latest vue-cli which is currently 3.0.0-beta.10 and vue init is no longer the standard way of initiating new project.

So, in your scenario, for v3 version you should use: vue create test-app.

Though if you still like to use vue init then do either of it:

  • See if things can work by doing what is suggested by @RuChernChong (I have not tried it)
  • Or, just reinstall the old vue-cli by just running npm install -g [email protected],

Side Note: You may need delete latest v3 manually if above mentioned suggestions doesn't work. Just run which vue you will find where v3 is installed and delete it manually and then run npm install -g [email protected]. Hope this should help.

Other places you can find help:

  • Check kinda related question here
  • Or, check how to use new v3 CLI here
Share:
10,381
lnmput
Author by

lnmput

Updated on June 15, 2022

Comments

  • lnmput
    lnmput almost 2 years

    I want to use vue-cli to initialize my vue project, but the vue and wepack version is the latest, This is not what I want, The older version is what I want, So I want to know how to install other versions of vue or webpack using vue-cli not the latest, Thanks!

  • isimmons
    isimmons about 2 years
    It's 2022 now so not sure what all has changed but now I also had to install globally @vue/cli-init to use the webpack template in this way. There are a few more questions/options to choose but it basically works the same and it installs vue 2.5.2 which is what I needed to follow a vue 2 tutorial.