-
Notifications
You must be signed in to change notification settings - Fork 888
NodeJS Error: spawn EACCES (different variants of this error) #3886
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
Comments
Hi @tracy-codes ! Could you please run an strace on the failing commands? Instructions on how to do so are here. It'll help us get a better picture of what's going on! |
Hi @mscraigloewen! Thank you so much for taking the time to investigate this issue. The following two gists are for the Now and the create-react-app test straces:
|
No problem :) We'll take a look and post any updates as they become available. |
@mscraigloewen Sounds good! Thank you ❤ |
Well, the only
Which would strangely enough make this variation #3833 (comment). What does
That might still fail for other reasons if If |
@therealkenc Running that path cmd and doing my node things seems to have worked! I think this issue is solved by the |
I'll close out this issue. Thank you for the fix @therealkenc , and thanks for filing the issue @tracy-codes ! |
YW. Glad you're up and running. But just for clarification, the underlying bug in both this issue and #3833 remains. I have no horse in that race mind you, and am never one to turn down a closed issue#. If |
Ah I see! I'll re-open the issue so we can track that the underlying cause isn't fixed. |
Alright I looked a little closer since I went and opened my mouth. I had said quoth "the WSL ABI is coughing up dirents that claim they can be executed when they can't". That isn't the case. In WSL (contrast the real thing) we have the added snag of paths where the underlying Windows user doesn't have permission. This is harmless in Windows because Windows software is written with the assumption that can happen. Having nonsensical components in one's Window's The repro over in #3833 is maybe better because
But that path isn't accessible, because the Windows user (me) doesn't have permissions to that path. That's going to be the case for the OP's Fix is going to be to launder path components from being imported when the Windows user doesn't have permission to that component. Basically, interop is imposing a "user error" on WSL, because it is putting components in the |
Running into this issue when trying to |
Yes |
some problem ... |
Among all those converted paths in For the moment, you can remove in # See https://stackoverflow.com/questions/370047/what-is-the-most-elegant-way-to-remove-a-path-from-the-path-variable-in-bash/29159378#29159378
removeFromPath() {
local p d
p=":$1:"
d=":$PATH:"
d=${d//$p/:}
d=${d/#:/}
PATH=${d/%:/}
}
removeDirFromPath "/mnt/c/Program Files (x86)/Lua/5.1/clibs" See this question for possibly further answers. |
According to these comments the fix might be as simple as updating zsh to version 5.7.1. |
My personal fix to avoid this problem was the realization that in WSL: mv file.txt other.txt fails miserably when there are file watchers, but cp file.txt other.txt is totally OK 😔 I am trying to survive with a temporal shell alias |
I'm still having this error when I try to spawn a process on node. Is it to do with file permissions? |
According to #3886 (comment) if the fix
works for you, too, then this issue is probably due to an executable in the environment variable |
No intended executable is (quoth) "clobbered". The intended executable doesn't exist, except on Windows, so the Windows exe gets picked up in the path walk. Subsequently, people launder their path per suggestion, discover the missing executable (commonly
If you're referring to the There is also #4104, and an edge case that occurs more often than you'd expect: a component in the user's Windows In any event, the OP was unblocked and there is no novel actionable remaining on this one (or, technically, a repro). Someone super motivated could in principle open a new issue with specific CLI repro steps (including the steps necessary to get the Windows |
Hey all, I've been having this issue for a few weeks now with NodeJS with modules that specifically need to spawn child processes. The two main packages I've enconutered this with are create-react-app's "test" command and Zeit's Now CLI within WSL. Below is the information necessary for the issues I'm experiencing.
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.17134.619]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
Reproduce the Zeit Now CLI Error
npm i -g now
now login
git clone https://github.com/tracy-codes/tracycodes-portfolio.git
(project files used to push to now)cd tracycodes-portfolio
now
Expected output is as follows:
Actual output on WSL:
Reproduce create-react-app's test error
npm i -g create-react-app
create-react-app test
cd test
yarn run test
Expected output:
Actual output in WSL:
I'm encountering multiple different "spawn EACCES" errors for Node modules that seem to require spawning child processes.
I've tested this with Jest with --watch, Create-React-App's "test" command, and the Now CLI from Zeit. For Create-React-App's "test" and Jest's --watch, they both output the "Error: spawn hg EACCES" with the above trace. I've tried the following to resolve the issue on my own:
Please let me know if there's anything else I can provide to add value to this issue report, and I hope someone can help me find a resolution for this!
I've reported this issue to Zeit's Now CLI team and they haven't ever encountered this error before:
#1902
The text was updated successfully, but these errors were encountered: