Search code examples
node.jsvue.jsnpmvue-cli

Set up Vue and @vue/cli


I'm trying to create a Vue project. First installed @vue/cli with command:

PS D:\OpenServer\domains\vue3-example> npm install -g "@vue/cli"

Then tried to directly create a Vue project with the command:

PS D:\OpenServer\domains\vue3-example> vue create .

This resulted in the following result:

@vue/cli setup

vue setup

I don't want to reinstall Node because my version of Node is used in other projects. In this case, as I understand it, I need to install the appropriate @vue/cli for Node v13.14.0. There were 3 questions:

  1. How to remove current @vue/cli?
  2. Which version of @vue/cli is suitable for Node v13.14.0?
  3. How to install @vue/cli version for Node v13.14.0?

Solution

    1. Use command npm uninstall -g @vue/cli to revert globally installing @vue/cli.
    2. According to Vue documentation versions 4.x are compatible with node v10+ and the support of node 13 was dropped in vue v5.
    3. Use command npm install -g @vue/cli@4 to install vue version 4.x