0
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 "create-react-app@5.0.1" 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 Answers1

1

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.

Alexxino
  • 557
  • 2
  • 16
  • I used (npx create-react-app . ) and it worked. Thank you! – Lewis Wachira May 15 '23 at 18:47
  • @LewisWachira appreciate it! If I helped you, you may set my answer to accepted so other people know that! You can do it by pressing the check under the top/bottom vote button <3 – Alexxino May 15 '23 at 20:26