skip to Main Content

I want to install vuejs and run it on Centos 7, I want to run it inside a specific folder.

2

Answers


  1. You need to install Node and NPM first. On CentOS 7 you can do this by running the following commands.

    curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
    
    sudo yum install nodejs
    

    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.

    Login or Signup to reply.
  2. [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/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search