Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command not found with vue-cli

While installing the dependencies of vue-cli, vue is not identified. Why?

error message while creating a project

like image 975
Alisha Mohanty Avatar asked Jul 04 '18 10:07

Alisha Mohanty


People also ask

How do I fix vue-CLI-service not found?

To solve the error "'vue-cli-service' is not recognized as an internal or external command, operable program or batch file", install the @vue/cli-service package globally by running npm install -g @vue/cli-service and clear your npm cache.

How do I fix zsh command not found vue?

To solve the error "vue: command not found", install the @vue/cli package globally by running npm install -g @vue/cli and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.

How do I access vue command line?

You can access the binary directly as vue-cli-service in npm scripts, or as ./node_modules/. bin/vue-cli-service from the terminal. You can run scripts with additional features using the GUI with the vue ui command.

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.


3 Answers

Add sudo before yarn when installing

  • yarn global remove @vue/cli
  • sudo yarn global add @vue/cli
  • vue
like image 70
Đoàn Quý Dậu Avatar answered Oct 11 '22 04:10

Đoàn Quý Dậu


rm -rf node_modules and npm install again have a look here

like image 26
Khem Raj Regmi Avatar answered Oct 11 '22 04:10

Khem Raj Regmi


Installing current version without permanently installing vue-cli.

npx @vue/cli create appname 
like image 19
EnzoTrompeneers Avatar answered Oct 11 '22 03:10

EnzoTrompeneers