Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

yarn install failing #213

Closed
FaisalST32 opened this issue Mar 31, 2020 · 14 comments · Fixed by #215
Closed

yarn install failing #213

FaisalST32 opened this issue Mar 31, 2020 · 14 comments · Fixed by #215

Comments

@FaisalST32
Copy link

Getting the following error when I try creating a new project

Initializing npm dependencies. This will take a minute.

√ Running yarn install in root directory
× Running yarn install in example directory
Error: spawn C:\windows\system32\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) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\windows\system32\cmd.exe',
path: 'C:\windows\system32\cmd.exe',
spawnargs: [ '/q', '/s', '/c', '"yarn install"' ],
stdout: '',
stderr: '',
failed: true,
signal: null,
cmd: 'C:\windows\system32\cmd.exe /q /s /c "yarn install"',
timedOut: false,
killed: false
}

The error occurs for both yarn as well as npm.

node version: 13.12.0
yarn version: 1.21.1

@knighteq
Copy link

me too

@transitive-bullshit
Copy link
Owner

Sorry; this was a mistake on my part. Please try upgrading to v3.0.4 and let me know if this is fixed for you.

@pgarberg
Copy link

Not working for me either, tried upgrading to v3.0.4, still nothing.

@transitive-bullshit
Copy link
Owner

@pgarberg would you mind running create-react-library --version and then your normal command and pasting the output? I'll help me a lot to debug things.

Thanks!

@Maheshs1
Copy link

Maheshs1 commented Apr 1, 2020

I am facing the same issue

@Maheshs1
Copy link

Maheshs1 commented Apr 1, 2020

I thought it was my computer's problem and wasted hours

@transitive-bullshit
Copy link
Owner

@Maheshs1 please post the output of the commands above after upgrading to the latest. I can't debug the issue if I can't reproduce it.

@FaisalST32
Copy link
Author

@transitive-bullshit here's the full output

C:\Users\xxxxxx\Desktop> create-react-library
? Package Name new-package
? Package Description Made with create-react-library
? Author's GitHub Handle test
? GitHub Repo Path test/new-package
? License MIT
? Package Manager yarn
? Template default

  • Copying default template to C:\Users\xxxxx\Desktop\new-package
    √ Copying default template to C:\Users\xxxxx\Desktop\new-package

Initializing npm dependencies. This will take a minute.

√ Running yarn install in root directory
× Running yarn install in example directory
Error: spawn C:\windows\system32\cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn C:\windows\system32\cmd.exe',
path: 'C:\windows\system32\cmd.exe',
spawnargs: [ '/q', '/s', '/c', '"yarn install"' ],
stdout: '',
stderr: '',
failed: true,
signal: null,
cmd: 'C:\windows\system32\cmd.exe /q /s /c "yarn install"',
timedOut: false,
killed: false
}

PS C:\Users\xxxxx\Desktop> create-react-library --version
3.0.4

@transitive-bullshit
Copy link
Owner

Thanks @FaisalST32. This appears to be a different issue than the original one and I'm guessing it's Windows-only.

If anyone on Windows could figure out the issue (possibly with our use of execa), that'd be really helpful as I don't have a Windows machine to test on.

@pgarberg
Copy link

pgarberg commented Apr 1, 2020

λ npx create-react-library
? Package Name test
? Package Description Made with create-react-library
? Author's GitHub Handle pgarberg
? GitHub Repo Path pgarberg/test
? License MIT
? Package Manager npm
? Template default

  • Copying default template to C:\Users\XXXX\Desktop\code\crl\test
    √ Copying default template to C:\Users\XXXX\Desktop\code\crl\test

Initializing npm dependencies. This will take a minute.

√ Running npm install in root directory
× Running npm install in example directory
Error: spawn C:\Windows\system32\cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn C:\Windows\system32\cmd.exe',
path: 'C:\Windows\system32\cmd.exe',
spawnargs: [ '/q', '/s', '/c', '"npm install"' ],
stdout: '',
stderr: '',
failed: true,
signal: null,
cmd: 'C:\Windows\system32\cmd.exe /q /s /c "npm install"',
timedOut: false,
killed: false
}

Looks like I am getting the same output as those above when running this as well. (ran with both npm and yarn to the same result)

Transitive-bullshit, running with execa may be beyond my current knowledge base, but let me know if there is anything I can do to help, and I will gladly try.

@antondelorme
Copy link
Contributor

Hi, this was also blocking me. I've solved it in PR-215 linked above. Could someone else also verify it works? (I've only tested on Windows atm)

@transitive-bullshit
Copy link
Owner

Thanks @antondelorme.

In the meantime, could you try updating to v3.0.5 and seeing if this resolves your issues?

I updated execa and switched from using shell to direct invocation.

@antondelorme
Copy link
Contributor

@transitive-bullshit No problem, npx create-react-library@3.0.5 resulted in the same ENOENT error

@transitive-bullshit
Copy link
Owner

Please let me know if v3.0.6 fixes the issue for you with @antondelorme's fix.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants