LOGO

VUE CLI install and errors like permission, VUE setup project manually

Jul 14, 2023
Tags: VUE, VUE2, VUE3  | Comments (0)


Last time we learned about installing VUE with CDN so we gonna learn CLI installing this time.


1. Use the command to install

If you use Windows or another OS, it's okay to use the below command.

npm install -g @vue/cli

If you saw this error message, try another command.

error

I use iOS, and face a permission problem so I need to add sudo in front of the command.

sudo npm install -g @vue/cli

* -g means global

The password is the same as the system login password.

password

 

3. After installation

Type the below command to check the version.

vue --version

version

 

4. Create a project

vue create hello-world

Notice, the hello-word is the project name! Give a nice name. ( Don't use capital text )

I named my project "test-demo".

 

5. Setup

Remember we want to set it up manually, so we can use the arrow key to select "Manually select features".

And we need the history mode, type "Y" and enter.

In this step, choose one of your CSS Preprocessors ( selecting what you want is okay ).

This step is to select what you want.

Just select what you want or follow my settings.

Keep going on.

You can save the above setting to default, or choose not ( type "N" ).

After setting, just wait and check if was it successful.

You can type "npm run serve" to start the local live demo or change the words "serve" to "dev" ( just want to type fewer words ).

We can go back to terminal now, type the command

npm run dev

It'll show the link.

Click it, you get your first project.

 

Comments (0)


Add a Comment





Allowed tags: <b><i><br>Add a new comment:


© Trista H. All rights reserved.