简体   繁体   中英

I'm facing problem with install yarn and use it but node is working finely

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

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

If you are using vscode interpreter then change your interpreter to command prompt from powershell and try. My problem solved by changing it在此处输入图像描述

I suggest you to look at that link , it should answer your questions and help you resolve your problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM