facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.65k stars 26.81k forks source link

Error while running create-react-app command on windows 11 using WSL #12016

Open aslamdoctor opened 2 years ago

aslamdoctor commented 2 years ago

Describe the bug

I have setup Ubuntu 20.04 LTS version on Windows 11 system using WSL2 feature. Every time I am trying to run the command npx create-react-app, it is throwing error as shown in the screenshot. I also tried installing the package globally using this command npm install -g create-react-app which works fine but after that running npx create-react-app still throws error.

WindowsTerminal_WNABFhdERY

Raju commented 2 years ago

When your using WSL/WSL2 make sure to use the Linux subsystem instead of Windows subsystem, so most of the features works out of the box like hot-refresh.

Try creating a new project inside the Linux subsystem.