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

yarn in docker alpine container running in wsl2 on windows tries to spawn cmd.exe #7893

Open
Stefan-Z-Camilleri opened this issue Feb 8, 2020 · 0 comments

Comments

@Stefan-Z-Camilleri
Copy link

Bug description

Given:

  • A vanilla node:13.8.0-alpine3.11
  • Running on docker 19.03.5 on top of WSL2 in windows

When:

  • I create a simple create-react-app
  • Install dependencies via yarn install
  • Try to run it via yarn start

Then:

  • It blows with the following error:
events.js:298
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn cmd.exe',
  path: 'cmd.exe',
  spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Note
This works perfectly fine with npm

Command

yarn start

What is the current behavior?
Fails because it tries to spawn cmd.exe

What is the expected behavior?
Should be spawning sh instead (or the defined shell)

Steps to Reproduce
See description.

Environment

  • Node Version: 13.8.0
  • Yarn v1 Version: 1.21.1
  • OS and version: Windows 10.0.19041.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant