Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems while setting up vue-cli

I'm trying to install Vue-cli environemnt via NPM.

npm install --global vue-cli

After that I want to create project

vue init webpack my-project

And I get an error

'vue' is not recognized as an internal or external command,
operable program or batch file.

I've read some solutions, most of them concern changing

PATH to C:\Users{YourUser}\AppData\Roaming\npm

Didn't work for me. Can anyone help.

like image 632
ogostos Avatar asked May 15 '17 16:05

ogostos


People also ask

How do you check vue CLI is installed or not?

You can verify that it is properly installed by simply running vue , which should present you with a help message listing all available commands.

How do you fix vue is not recognized as an internal or external command operable program or batch file?

To solve the error "'vue' is not recognized as an internal or external command, operable program or batch file", install the @vue/cli package globally by running npm install -g @vue/cli , restart your terminal and make sure your PATH environment variable is set up correctly.

Is vue CLI necessary?

Vue CLI aims to be the standard tooling baseline for the Vue ecosystem. It ensures the various build tools work smoothly together with sensible defaults so you can focus on writing your app instead of spending days wrangling with configurations.


2 Answers

Well, problem was solved by simply deleting everything related to vue-cli installed before. And re-installing vue-cli.

like image 161
ogostos Avatar answered Sep 30 '22 02:09

ogostos


I was installing @vue/cli using yarn, i.e. I ran

yarn global add @vue/cli

Calling vue on windows did not work after the installation ('vue' is not recognized as an internal or external command)

What I needed to do was to add C:\Users\<MY USERNAME>\AppData\Local\Yarn\bin to path.

like image 32
David Vonka Avatar answered Sep 30 '22 02:09

David Vonka