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
'react-scripts start' does not work on linux (WSL) #9644
Comments
Couldn't reproduce it on WSL
|
So it appears it only happens when you have windows path disabled in wsl.config via the following option:
It makes sense since powershell is available on path when this option is not disabled, but don't think react-scripts should be relying on powershell being available on Ubuntu. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Have same issue on WSL2 with newly created app and react-scripts@4.0.2 It fails only if we open default browser. If you set env variable BROWSER to none there will be no error, so I guess error is in react-dev-utils. Edit Jumped into rabbit hole and found that package |
I was able to bandaid this by symlinking /c to /mnt/c |
I was also able to fix the problem this way, for anybody looking for the appropriate command:
|
Can you try the latest release and see if this has improved? If not please open a new issue. |
Thank you for this fix. I have been struggling with getting my node project to run on WLS and happened across this entire thread. Adding the symlink solved my problem. |
Describe the bug
On linux (WSL) npm run start fails with the following error
spawn powershell.exe ENOENT
Not sure why its trying to spawn powershell on Linux but this seem to have been introduced from version
3.0.0
ofreact-scripts
. The workaround is to downgradereact-scripts
to2.1.8
This is reproducible on a fresh install using latest npm version
6.14.8
and latest nodejs verison14.10.1
(also reproducible on 10.x)Did you try recovering your dependencies?
Reproducible on a fresh install so unlikely its related to corrupt dependencies.
Environment
Steps to reproduce
Note: This is reproducible at least on Linux (WSL - Ubuntu), it maybe reproducible on Linux generally but I have not tested.
Expected behavior
Actual behavior
Reproducible demo
This can be reproduced on a newly created project so demo project is not relevant.
The text was updated successfully, but these errors were encountered: