Cnpm + Yarn + Vue CLI

  • Use cmd to check node and npm versions.

    node -v
    npm -v
    

    insert image description here

  • Install cnpm.

    npm install -g cnpm --registry=https://registry.npmmirror.com
    
  • Check if cnpm is installed successfully.

    cnpm -v
    

    insert image description here

  • Install the package management tool yarn.

    npm install -g yarn
    

    insert image description here

  • Check if yarn is installed successfully.

    yarn -v
    

    insert image description here

  • Install vue scaffolding globally.

    cnpm install -g @vue/cli
    
  • Check if vue cli is installed successfully.

    vue -V
    

    insert image description here

  • Create a project using vue cli.

    vue create vue_manage(project name)
    

    insert image description here

    The configuration item selected here is vue2!

    The up and down arrow keys indicate selection, and Enter indicates the next configuration item.

    insert image description here

  • Run the project.
    insert image description here
    insert image description here

    Note that although vue3 has come out, many of them are currently vue2, and vue2 and vue3 are very different. If the versions are different, errors may be reported, so you need to pay attention to Austria!

Guess you like

Origin blog.csdn.net/qq_43779149/article/details/123545448