Can anyone tell me how to install React on my computer?
I’m following the instructions written on the React docs but it is giving an error in cmd ‘npm’ is not recognized as internal or external command, operable program or batch file.
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Ravi Ujjwal
React installation is very simple but before that you need to set up few things first. Package managers like npm and yarn. The error you got because npm is not installed on your system so the system is not recognizing the npm command.
Installing npm:
You need to install Node.JS first. Head over to https://nodejs.org/en/ and download the latest version. I’ll prefer LTS version as it is considered most stable.
According to npm website. npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer.
Installing yarn:
This step is purely optional. Proceed only when you’re done setting up Node.JS.
Install chocolatey first. Head over here for complete steps. https://chocolatey.org/install
Then in the CMD type,
Installing React:
npx create-react-app my-app
Done! I hope this solves your issue.
Pooja Jakhar
To install React on Windows follow these simple steps –
That’s all, you need to do to install React on Windows.