Vue 2 Tutorial- How To Check Current Vue Js Application Version

How To Check The Existing Vue Js Application Version Quickly

In this Vue Js guide, we will be learning three methods through which we can identify the version of our Vue app.

Let’s now start step by step.

Step 1- Install Vue CLI

First of all, we have to install the Vue CLI environment using the below command:

npm install -g @vue/cli

 

Check the Vue CLI version

vue --version

 

Further, we have to install the Vue application:

vue create my-vue-app

 

Now, we head over to the project root:

cd my-vue-app

 

Step 2- Display Vue Version On Terminal

We just have to open the terminal window and execute the following command:

npm list vue

 

The Vue version output on the terminal:

vue@2.6.12

 

Step 3-Browse Package.json

We simply need to open the package.json file and look for the highlighted line:

 

Check Vue version

 

Step 4- Check Vue Version With Vue.version

We can ascertain the Vue version number using the Vue.version property. It will take out the current Vue version from its locus.

Afterward, we head over to the main.js file and pass the Vue.version within the console.log() method.

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

 

Error: digital envelope routines::unsupported
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'

 

To remove the above error for invoking the app, we have to make sure to update the “scripts”: [] array in the package.json file:

"scripts": {
    "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
    "lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
},

 

Step 5- Start The Application

We simply have to hit the below command in order to run the Vue app:

npm run serve

 

Now, we will open the browser console and check the Vue version.

 

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *