When installing vue create hello-vue3, an error message "Unable to load file, running scripts is prohibited on this system"

When I use a new computer for the first time to download installation packages such as vue , npm , and rimraf , I get the error
"File cannot be loaded. Running scripts is prohibited on this system."

Insert image description here
Because the Restricted execution policy does not allow any scripts to run.
Solution:

  1. Win+r opens the command prompt and enter powershell start-process powershell -verb runasto run as administrator.
  2. Enter get-executionpolicyto view the status as Restricted (indicating that it is restricted and the status is prohibited)
    Insert image description here
  3. Enter set-executionpolicy remotesignedand then enter Y.
    Insert image description here
    The meaning of checking again is: locally created scripts can be run, and signed scripts authorized by trusted publishers can be executed, and that's it.
    Finally, look at the execution results
    ![Please add image description](https://img-blog.csdnimg.cn/e30302f829e44fa5ac9b14b4a0a27b8f.png

Guess you like

Origin blog.csdn.net/Jet_Lover/article/details/125680333