How to install vue js 2 and create vue project with vue cli
How to install vue js 2 and create vue project with vue cli
In this post, you will be learning how to install and run the vue js 2 project with Vue CLI. So, Let's get started.
Step 1: Creating a Project | Vue CLI
Download and install Node.js and NPM Package in your system.
When you download your node.js and install it, your npm package also install's with it.
Let's check the node and npm is installed or not in your system. Open your terminal and check with the following command.
To check the installed version of node js:
To check the installed version of npm:
Node Js requirement: Vue CLI requires Node.js version 8.9 or above (v10+ recommended).
Step 2: if you have already installed the npm, so please update to latest version.
OR
Step 3: After nodeJs and npm successfull installation. If you have Vue Js installed already, you can check the vue version by the below command:
Warning regarding Previous Versions
The package name changed from vue-cli
to @vue/cli
. If you have the previous vue-cli
(1.x or 2.x) package installed globally, you need to uninstall it first with:
OR
Step 4: Let's Install the Vue CLI by the following command:
OR
Step 5: After vue installation, You can verify that it is properly installed by simply running command as follows:
You can check the installed version with this command:
Step 6: If you have an older version of Vue CLI installed in your system, you can update it by the following command:
OR
Step 7: Let's create a project in Vue Cli by following command:
Step 8: Let's run the project by the below command.
That's it. your project will be started at: http://localhost:8080/
Thanks for reading.