0

my question related to yarn. Before when I start create projects I installed with npm. After long time when I want to start to running with yarn its says following error:

yarn : File C:\Users\pc\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this system.

(in Windows machine, Powershell)

Widnow: 10

I tried with git bash terminal it worked!
but not in my powershell terminal

jonrsharpe
  • 107,083
  • 22
  • 201
  • 376
  • Does this answer your question? [PowerShell says "execution of scripts is disabled on this system."](https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system) – Scepticalist Aug 27 '21 at 08:35

1 Answers1

0

I have just fixed it by myself, anyway I am going to post answer here:

//open windows command Power shell as administrator and run command

  1. Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

  2. Set-ExecutionPolicy Unrestricted