by Sai gowtham

How to check the Vue Version Quickly

In this tutorial, we are going to learn about how to check the vue version currently we are using in our project.

Note: This tutorial assumes that you already created a new vue project using the vue-cli.

Using the Vue.version

We can use the Vue.version property to check the current vue version during a runtime.

Example:

In your main.js file add the following log.

main.js
import Vue from 'vue'
import App from './App.vue'

console.log(Vue.version);  // 2.6.11
new Vue({
  render: h => h(App),
}).$mount('#app')

Using the terminal

Inside the terminal, you can check the vue version by running the following npm command.

npm list vue

Output:

vue@2.6.11

or you can view the vue version directly, inside your project by opening a package.json file.

package.json
{
  "name": "vue-todo",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.4",
    "vue": "^2.6.11"  },

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
26,545 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
221,520 students enrolled
44 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
114,575 students enrolled
21 hours of video content
View Course