Vue.js: How to install Vue.js on Ubuntu Linux

Vue.js requires that Node.js version 6.x is already installed. See this previous article for instructions on installing Node.js:

JavaScript: How to install Node.js on Ubuntu Linux

To install Vue.js, use each one of these commands in the Ubuntu terminal, in order:

Command #1:

sudo npm install --g vue-cli

Command #2:

vue init webpack myapp

Where “myapp” is the name you are assigning to the app. This command will initiate a series of questions in the Terminal that must be answered to continue. For example:

Commands #3-5: (one at a time)

cd myapp
npm install
npm run dev

The final command ‘npm run dev’ will initialize a browser page at localhost:8080.

In the browser at location localhost:8080/#/ with a title of “myapp”, there will be a Vue welcome screen:

Leave a Reply