-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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
- Login with your now credentials
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:
$ now
now
> Deploying ~\dev\tracycodes\tracycodes-portfolio under tracycodes
> Using project my-portfolio
https://my-portfolio-cg6rbcv31.now.sh
┌ ** Ready [414ms]
├── src/main.js
├── src/img/favicon.png
├── index.html
├── README.md
├── _redirects
├── src/style.css
├── about.html
└── coming-soon.html
> Success! Deployment ready [4s]
Actual output on WSL:
$ now
> Deploying /c/Users/tracy/dev/tracycodes/tracycodes-portfolio under tracycodes
> Using project my-portfolio
> Synced 5 files (8.87KB) [2s]
> https://my-portfolio-8zxgcamfp.now.sh [v2] [1s]
> Error! An unexpected error occurred!
Error: spawn xsel EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19) Error: spawn xsel EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Reproduce create-react-app's test error
npm i -g create-react-app
create-react-app test
cd test
yarn run test
Expected output:
$ yarn run test
yarn run v1.13.0
$ react-scripts test
No tests found related to files changed since last commit.
Actual output in WSL:
$ yarn run test
yarn run v1.13.0
$ react-scripts test
Determining test suites to run...events.js:173
throw er; // Unhandled 'error' event
^
Error: spawn hg EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
at onErrorNT (internal/child_process.js:421:16)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12)
at onErrorNT (internal/child_process.js:421:16)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
- What's wrong / what should be happening instead:
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:
- Completely remove NPM, Node, and Yarn and reinstall from scratch
- Install watchman (recommended by FB and seems to fix the issue on some Macs)
- Set permissions to 777 for global node_modules and local modules in the projects' directories
- Uninstalled/Deleted WSL and did a clean install, installed Node/NPM/Yarn first, then went through the reproduction steps above and still encountered the errors
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