Home > Software engineering >  Yarn Installation not brings Vue files
Yarn Installation not brings Vue files

Time:03-17

As a newbie, i am trying to properly install yarn via VsCode terminal, and having an issue; I use

yarn add -g @vue/cli

command to install, after installation i am still not able to use vue ui command(throws: the term ‘vue’ is not recognized as the name of a cmdlet…’), so it made me think of the vue.cmd not installed in my system, then i check my npm directory, i can see 3 different yarn files, but no vue files at all..

I have been using npm before and already uninstalled before yarn installation, with following command:

npm uninstall -g @vue/cli

After uninstalling npm, the vue files in npm directory are gone, as expected. Is there any other step that I should take to install vue.cmd files(if its necessary)? Maybe i should not have to uninstall npm, becacuse npm installation brings vue files into my system?

Thank you in advance,

CodePudding user response:

Instead of using:

yarn add -g @vue/cli

Use this command:

yarn global add @vue/cli

Note: If you are on windows you have to use CMD to run vue cli commands. As by default PowerShell doesn't allow to run packages that were installed globally via npm or yarn. You may need to disable PowerShell security to use that package in PowerShell. But I recommend you to use cmd to use the package after installation. But still, you can install the package via PowerShell.

  • Related