how to downgrade vue version from 3 to 2 - vue.js

I am using Vue3 for studying but it cannot support Vuetify library. So I need to downgrade it to version 2. How can I do that?
Vue3 is not installed in global. And vue-cli is installed in global, which is version 4.5.15.

You can use
npm install <package>#<version>
However, if you have components you have to update their code also.

1 INSTALL VUE JS 2
npm install vue#2.x.x
2 UPDATE YOUR VUE-LOADER
npm update vue-loader
3 if it is not installed, install it
npm i vue-loader
4 install vue/compiler-sfc
npm add vue#next
npm add #vue/compiler-sfc -D

Related

How to install vue.js version 2

I want to install version 2 of vue.js to use vuetify. However, I don't know the command for that. Could someone pass the command to me please
If you are looking for a specific version of Vue2 you can run the following command with npm: npm install vue#2.x.x or if you want the latest, simply npm install vue.
For vue3 it is: npm install vue#next
Сreated a new Vue.js project using Vue CLI. Select during installation Vue2
vue create my-app
# navigate to new project directory
cd my-app
Add vuetify
vue add vuetify
npm install vue#2.x.x --save
It will update package.json as well.
so later on, if you need to install the project from git, by running
npm install
easily package can be installed

How to uninstall VUE 4.1.2

Okay,
so i thought this is a quite simple task,
i run npm uninstall -g vue-cli as an admin but it return up to date in 0.043s.
Am not sure what to do to delete properly vue js from my machine.
am running windows 8.1 pro, vue-cli 4.1.2, npm 6.14.4 , node v12.14.1
npm uninstall -g #vue/cli
Try this, and that's just remove vue-cli from your dependencies. If the project is vue-based, whether you remove the library or restart new project base.
You should run npm uninstall -g #vue/cli
according to this: https://forum.vuejs.org/t/how-to-uninstall-vue-cli-3/74083

How to install vue.js in my ubuntu system. | E: Unable to locate package vue |

I am using ubuntu 18. I tried to install the vuejs. I have already installed node version 8.10 and npm version 3.5.2. while i tried to install i receiving error like this. I have attached the screen shot.
Kindly refer below screen shot also
It looks like you are trying to install Vue in the global node_modules directory.
A tried and true way is running the same command from within your node.js project.
cd /home/hp/coolproject
npm install vue
Another great way to use Vue is Vue CLI
You need to install #vue/cli and possible options for you will be to either use yarn or npm but not apt. You will have to install the vue package globally so for that in npm use -g or global in yarn. The full commands will look like this:
sudo npm install -g #vue/cli or sudo yarn global add #vue/cli.
To make sure you have vue installed then run vue --version for short.
Let me know is that fixes your problem.

vue packages version mismatch vue#1.0.28-csp

I'm new to npm & vue and have followed instructions to install both.
When I run vue create, I get the follwing
Vue packages version mismatch:
- vue#1.0.28-csp (C:\Users....vue.common.js)
- vue-template-complier#2.6.10 (c:\Users.....package.json)
How do I fix this?
I've seen others with a similar problem but not with the -csp file
My Vue version is 3.11.0.
I've fixed the issue but I'm not sure how!
I uninstalled vue and then tried again:
npm install -g #vue/cli
vue init webpack vueapp01 - I didn't do this last time, so maybe this is the answer!
Now when I do vue create hello-world, it works!
Thanks for your help #Ohgodwhy
Your vue-cli version is 3.11.0, not your vue version. You have globally installed version of vue at 1.0.28-csp. What you should do is:
npm update -g vue
or
yarn global update vue
which should bring it in line with the template compiler.

vue-cli Vue init webpack template gives unexpected token error

I get the message
vue-cli · Failed to download repo vuejs-templates/webpack: Unexpected token ...
When i attempt to create a new project
Im using
Node version 6.12..3
Npm version 3.10.10
Vue cli version 2.9.2
Update your node by installing the latest version 9.4.0 from their official site
Then update npm by running npm install npm#latest -g
Then run these commands again:
npm install vue
npm install --global vue-cli
vue init webpack my-project-name
Don't forget to change my-project-name to the name of your project.
I've just did that and it successfully created a new Vue project with Webpack