After this, confirm that Node and NPM are installed by running node --version and npm --version.
Then you need to install vue-cli. This makes creating Vue applications very easy. Install it by running npm install -g @vue/cli. After that has installed, you can create new projects by running vue create <project-name>. Once you have created the project, you can run it locally using npm run serve.
2
Answers
You need to install Node and NPM first. On CentOS 7 you can do this by running the following commands.
After this, confirm that Node and NPM are installed by running
node --version
andnpm --version
.Then you need to install
vue-cli
. This makes creating Vue applications very easy. Install it by runningnpm install -g @vue/cli
. After that has installed, you can create new projects by runningvue create <project-name>
. Once you have created the project, you can run it locally usingnpm run serve
.[updated]
It’s a little bit different, but works fine to me on CentOS 7
(deprecated but working fine)
$ curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash –
$ sudo yum install -y nodejs
$ node –version
$ npm –version
$ sudo npm install -g @vue/cli
$ vue create [projectname]
go to the folder of project name:
$ cd projectname
$ npm run serve
open your internet browser and type http://localhost:8080/