Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: Can't run yarn on most Windows machines #6122

Closed
1 task
asvishnyakov opened this issue Feb 9, 2024 · 1 comment
Closed
1 task

[Bug?]: Can't run yarn on most Windows machines #6122

asvishnyakov opened this issue Feb 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@asvishnyakov
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

By default powershell execution policy is set to Restricted on Windows. So when our Windows developers trying to use yarn 4 on their machines with corepack enabled it's common to have the following error:
yarn: File C:\Program Files\nodejs\yarn.ps1 cannot be loaded because running scripts is disabled on this system

This is probably related to nodejs/corepack#213

To reproduce

  1. Install Windows
  2. Clone any project with yarn
  3. Run corepack enable - it will may also fail because of insufficient permissions
  4. Run yarn - receive the error

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
  Binaries:
    Node: 20.11.0 - C:\Users\ALEKSA~1\AppData\Local\Temp\xfs-2d7894a2\node.CMD
    Yarn: 4.0.2 - C:\Users\ALEKSA~1\AppData\Local\Temp\xfs-2d7894a2\yarn.CMD
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD

Additional context

No response

@asvishnyakov asvishnyakov added the bug Something isn't working label Feb 9, 2024
@merceyz
Copy link
Member

merceyz commented Feb 9, 2024

This is probably related to nodejs/corepack#213

Yeah, it's on Corepack to solve this so let's track it there.

@merceyz merceyz closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants