Install VueJS in Ubuntu 20.04
Tags: javascript, webdev, linux, vue
Published: 2022-01-28 14:56:03


  
We'll walk you through a simple step-by-step method to get started with Vuejs. Vuejs is an approachable and simple-to-learn JavaScript framework that is powerful, progressive, and reactive. It includes a variety of tools and libraries that make the application development process easier. You can start designing web applications using Vuejs in no time if you know HTML, CSS, and JavaScript.
**Installation:**
       To integrate Vue.js into a project, you can use the CDN package, NPM, or CLI .
**Using the CDN Package:**
If you want to learn Vuejs, the CDN package is the best place to start. To get started, simply add the following script tag to your project.

```
<script src="https://unpkg.com/vue@next"></script>
```
However, this method is not recommended for production purposes because it can lead to issues with compatibility in the future.
**Using NPM:**
Vuejs should be installed using NPM for large-scale production applications. You must have Nodejs installed on your computer to use this method.Open your terminal or press Ctrl + Alt + T. For Nodejs and npm run this command:
```
sudo apt install nodejs
```
  ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6xam75gup8fwlohpzgo.png)  
When you install nodejs, you should also install npm.
Verify the install by checking the version of Nodejs and npm you have downloaded:

```
nodejs --version
```
For NPM

```
npm --version
```
For latest stable version of vuejs :

```
npm install vue@next
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/543spb3r9osub89bvh7f.png)

**Using CLI :**
Vue CLI is a complete Vue.js development package. The NPM package manager is used to install CLI globally. You must have some prior understanding of Node.js and front-end build tools before installing Vue.js using the Vue CLI technique. Additionally, we have the option of using npm or the yarn package management.

```
$ sudo yarn global add @vue/cli
# OR
$ sudo npm install -g @vue/cli
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opa192kglsk4r8way9u8.png)
You may simply upgrade your applications after installing the latest version of Vue.js with Vue CLI. Run the following command to see what version of Vue.js you have.

```
vue --version
```
You can use the following Vue CLI command to upgrade to the newest stable version of Vue.js.

```
$ sudo yarn global upgrade --latest @vue/cli
# OR
$ sudo npm update -g @vue/cli
```
**Getting started with Vue.js**
To get started with Vue.js, use the Vue CLI to create a project using the following command.

```
vue create demo-app
```
After running this command, you will be asked to choose a preset.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9aahhsiafi580a6llwu.png)
You can either use the preset features or create your own. The following command can be used to create a Vue project using the GUI technique.

```
vue ui
```
This command will open a window in the browser to help you create a project.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjo7q5fagnt5yannbav5.png)
**Summary**
We showed you how to install Vue.js using three alternative techniques in this article. You can quickly manage your web application after installing Vue.js. You can utilise the CDN package technique to get started with Vue.js right away. For production reasons, however, you should use either the NPM or CLI methods.
Follow Me : [Twitter](https://twitter.com/Bilalniaz15)  [LinkedIn](https://www.linkedin.com/in/bilal-niaz-147792214/)