i am newbie in react. I want to create a react application in VS code but it can't create it.#
43 Answers
It does not matter what you use to create a react app. The steps are:
- Install node for your system from
- Open Visual Studio Code, click on "terminal" on top menu, click on "new terminal", it should open a terminal on the bottom of VS code.
- Enter the following commands:
npx create-react-app my-app cd my-app npm start to create the react application and start it. Happy coding!
EDIT: if you are having issues running it, it may be that you installed create-react-app globally which does not work now. Here are the steps to verify it:
- uninstall create-react-app:
npm uninstall -g create-react-app - clear cache:
npm cache verify - use npx:
npx create-react-app app-name
you can create an app using npx for more infos check documentation here
This is the usual procedure to create a new react app.
- Install React from
- Go to the terminal and type npx create-react-app
- then code . (to open the project in vs code)