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

Windows + yarn pnp: [vite] Get yarn cache dir error: spawnSync C:\Windows\system32\cmd.exe ENOENT #18136

Closed
7 tasks done
pwilkowski opened this issue Sep 18, 2024 · 1 comment · Fixed by #18141
Closed
7 tasks done

Comments

@pwilkowski
Copy link

Describe the bug

When building angular app with their new build system application that is using vite i am getting following error

 [vite] Get yarn cache dir error: spawnSync C:\Windows\system32\cmd.exe ENOENT

While it is error in angular app, i tracked it down to vite repository:

logger.warn(`Get yarn cache dir error: ${e.message}`, {

Reproduction

https://stackblitz.com/edit/stackblitz-starters-zk4gna

Steps to reproduce

It is not possible to reproduce in stackblitz because it does not support yarn pnp.

  1. Need to be on windows
  2. setup any 18+ angular app with ng new
  3. This should make use of yarn 4.5.0
yarn set version stable
  1. create file .yarnrc.yml
  2. paste content
nodeLinker: pnp
enableGlobalCache: false
  1. yarn
  2. yarn start

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 104.85 GB / 127.93 GB
  Binaries:
    Node: 20.14.0 - C:\Programy\nodejs\node.EXE
    Yarn: 4.1.0 - C:\Programy\nodejs\yarn.CMD
    npm: 10.7.0 - C:\Programy\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

yarn

Logs

No response

Validations

Copy link

stackblitz bot commented Sep 18, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant