Why is yarn create react-app ./ not working

51 views Asked by At
PS C:\Users\Lewis Wachira\OneDrive\Desktop\Snack Shark Restaurant> cd clientPS C:\Users\Lewis Wachira\OneDrive\Desktop\Snack Shark Restaurant\client> yarn create react-app ./yarn create v1.22.19[1/4] Resolving packages...[2/4] Fetching packages...[3/4] Linking dependencies...[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:create-react-app'C:\Users\Lewis' is not recognized as an internal or external command,operable program or batch file.error Command failed.Exit code: 1Command: C:\Users\Lewis Wachira\AppData\Local\Yarn\bin\create-react-appArguments: ./Directory: C:\Users\Lewis Wachira\OneDrive\Desktop\Snack Shark Restaurant\clientOutput:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

I'm trying to create a react app in my client folder but I'm getting an error. The first command I ran was:

  1. cd client

Then I ran

  1. yarn create react-app ./`
1

There are 1 answers

2
Alexxino On

I think you should instead run

yarn create react-app .

If you can't do it with yarn, I'll suggest you to try with npx or npm, like this:

npx create-react-app .

or

npm init react-app .

That . specifies the location for the react app to be initialized.