1

yarn : File C:\Users\USER\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • yarn
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
Md Zahid
  • 440
  • 2
  • 8
  • Does this answer your question? [VSC PowerShell. After npm updating packages .ps1 cannot be loaded because running scripts is disabled on this system](https://stackoverflow.com/questions/57673913/vsc-powershell-after-npm-updating-packages-ps1-cannot-be-loaded-because-runnin) – mc-user Aug 25 '22 at 09:03
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 25 '22 at 10:33

2 Answers2

3

If you are using vscode interpreter then change your interpreter to command prompt from powershell and try. My problem solved by changing it enter image description here

Sensei_75
  • 56
  • 4
2

Npm worked fine for me, but yarn also had some Windows problems. According to my experience, deleting yarn.ps1 solved the problem:

C:\Users{YourUserName}\AppData\Roaming\npm\yarn.ps1

Md Zahid
  • 440
  • 2
  • 8