Problems setting up vue-cli

I am trying to install a Vue-cli environment through NPM.

npm install --global vue-cli

After that I want to create a 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 read some solutions, most of which are about change

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

Not working for me. Can someone help.

+8
source share
8 answers

Well, the problem was solved by simply removing everything that was related to vue-cli. And install vue-cli again.

+1
source
yarn add @vue/cli-service

or

npm install @vue/cli-service

this is what works for me

+3
source

, vue-cli . , vue vue-cli ,

vue init webpack myfirstproject

:

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

, . , NPM :

NPM version: 6.2.0
Node version: 8.7.0

, vue-cli (8.7.0). Node> = 8,9. Node. .

upgrading your Node version is the correct way to deal with this issue
+2

.

create-react-app@1.5.2

npm -g --depth = 0

create--

npm create-

Vue vue-cli-service .

+1

, node_modules ,

+1

, :

C:\Program Files\nodejs PATH. :

  1. , " "
  2. " "
  3. " "
  4. " " "" , C:\Program Files\nodejs.

, .

, , !

+1

, , .

0

, .

npm install -g vue-cli

npm install -g vue

, , ,

C:\Program Files\nodejs\node.exe;

C:\Users\{UserName}\AppData\Roaming\npm

vue, C:\Users { }\AppData\Roaming\npm enter image description here

Image 1

Image 2

Image 3

0

Source: https://habr.com/ru/post/1677191/


All Articles