I'm have some issues when trying to install Vue CLI on my mac device. I am using the terminal and I also want to work with yarn and not with npm. These are the commands used:
yarn global add @vue/cli
After doing that I got a message on the terminal where it says that it has been successfully installed. However, when I try to run one of the commands:
"vue" or "vue --version"
I get the following message => zsh: command not found: vue
CodePudding user response:
You should use npm instead it will work.
yarn global remove @vue/cli
and then install using npm.
npm install -g @vue/cli
don't worry! on normally you can use yarn but for global use npm.
solution - 2
yarn global bin
add yarn global directory into your path
CodePudding user response:
Update, i fount the issue. So basically I was missing one extra command. This is the chronological order for commands:
yarn global add @vue/cli
export PATH="$(yarn global bin):$PATH"
vue