Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue : command not found after installing @vue/cli

Tags:

vue.js

vue-cli

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>
like image 882
Lin Aung Avatar asked Mar 12 '19 02:03

Lin Aung


People also ask

How do I know if vue command line is installed?

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.

How do I run vue APP command?

To launch a VueJs project, you must type "npm run serve".


1 Answers

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

like image 66
Lin Aung Avatar answered Oct 10 '22 13:10

Lin Aung