Hernan
Hernan

Reputation: 115

How can i install vue cli?

I come here to solve this problem: I have installed node (Ver. 12.13.1) in my computer, then I use node -v to see if node are well installed, and yes, it is.

Later, I use npm install @vue/cli, it installs the framework, but when a do a vue --version throws me a error.

I have tried in the terminal of visual studio code and throws me the error too. I tried uninstall and install node, and do the before stuff again, but its not working, the error remains

What could I do? Why is this happening?

Error in english:

Cannot load file C:\Users\halva\AppData\Roaming\npm\vue.ps1. 
The file C:\Users\halva\AppData\Roaming\npm\vue.ps1 is not digitally signed.
You cannot run this script on the current system. 
For more information about the execution of scripts and execution policy settings, 
see about_Execution_Policies at https: /go.microsoft.com/fwlink/?LinkID = 135170

Photos of the code: PS Terminal and Visual Studio Code Terminal

Upvotes: 7

Views: 5356

Answers (3)

sairfan
sairfan

Reputation: 1062

this command help to get rid off error message and execute the command, I am sharing here for help, looks like you should be sure whatever libraries you are using they are safe for your computer.

>Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Source https://github.com/vuejs/vue-cli/issues/3424

Upvotes: 0

Sweet Chilly Philly
Sweet Chilly Philly

Reputation: 3219

Can confirm this is a powershell issue:

Please read this github issue on the matter: https://github.com/vuejs/vue-cli/issues/3424

People have suggested getting the same issue with vue-cli installed globally.

Solution: delete the erroring file: File C:\Users\halva\AppData\Roaming\npm\vue.ps1.

Sidenote: What I suggest is to not use powershell, and use something like gitbash: https://gitforwindows.org/ (but this is entirely an opinion)

Upvotes: 10

Presmelito
Presmelito

Reputation: 212

You should install vue-cli globally

npm install -g @vue/cli

Upvotes: -1

Related Questions