7

I don't know why isn't working for me. I opened powershell as administrator and run npm install -g @vue/cli. I have done uninstalling vue-cli and restalling again doesn't work. Here is my error

PS C:\WINDOWS\system32> npm install -g @vue/cli
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
C:\Users\Lin Aung\AppData\Roaming\npm\vue -> C:\Users\Lin Aung\AppData\Roaming\npm\node_modules\@vue\cli\bin\vue.js

> [email protected] postinstall C:\Users\Lin Aung\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\protobufjs
> node scripts/postinstall


> [email protected] postinstall C:\Users\Lin Aung\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @vue/[email protected]
added 680 packages from 509 contributors in 172.749s
PS C:\WINDOWS\system32> vue
vue : The term 'vue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ vue
+ ~~~
+ CategoryInfo          : ObjectNotFound: (vue:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32>

3 Answers 3

15

Adding %APPDATA%\npm to the PATH fixed my problem

Sign up to request clarification or add additional context in comments.

Comments

0

install using sudo

sudo yarn global add @vue/cli

1 Comment

The issue is on windows.
0

At windows:

First step: %path%;%appdata%\npm;C:\Program Files\nodejs;C:\Users\User.npm-global;C:\Program Files (x86)\bin\

in environment variable

second step: https://classic.yarnpkg.com/en/docs/install/#windows-stable

install yarn or npm

third step: run window shell as administrator

set-executionpolicy unrestricted

Forth step : yarn global add @vue/cli

Result:

C:\Users\User>vue --version @vue/cli 4.5.15

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.