Tried npm uninstall -g create-react-app that didn't work for me. I did the following and it worked: Elevated cmd prompt: where create-react-app it was somewhere in the system files under yarn. Follow that path and delete both the files. Go to the working directory, in my case a folder inside documents. Run npx create-react-app my-test-app.
1. React provided us a CLI command called create-react-app, we need it to install it globally
2. After create-react-app installs successfully go ahead and create a new project
Using comment create-react-app my-app, this command will create a new directory and install our react app. This command gives a directory listing
4. You can use Yarn or NPM to run ReactJS app
This command will initialize our app and if our application compiles successfully we will be greeted with React welcome screen:
6. This will build your app in the build folder. We will need to install serve globally to serve our build app. You can install serve globally by:
7. This will install serve globally and we can serve our application by:
8. This will run our build application on the server:
The same app will be run a different server. But the application is ready to deploy!
This will install create-react-app and let us initialize our React Application with the above following steps.