19
loading...
This website collects cookies to deliver better user experience
cmd
. Here is a helpful walkthrough guide on how to access the command prompt for the different Windows versions. node -v
v16.10.0
Node.js
, then please look into these helpful guides.npx
is a helpful tool you can use to download packages from the npm registry.cd
stands for change directory.cd Desktop
jessicawilkins@Dedrias-MacBook-Pro-2 Desktop %
demo-react-app
.npx create-react-app demo-react-app
Creating a new React app in /Users/jessicawilkins/Desktop/demo-react-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
Success! Created demo-react-app at /Users/jessicawilkins/Desktop/demo-react-app
cd
followed by the name of your new React project.cd demo-react-app
npm start
in the command line. That will start the local server and open up your new React app.npm start
http://localhost:3000/
.Compiled successfully!
You can now view demo-react-app in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.1.131:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
Ctrl+C
in the command line. cd
stands for change directory.cd Desktop
jessicawilkins@Dedrias-MacBook-Pro-2 Desktop %
npm
version 6 or higher. my-app
.npm init react-app my-app
Creating a new React app in /Users/jessicawilkins/Desktop/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
cd my-app
npm start
and hit enter.http://localhost:3000/
.Ctrl+C
in the command line. yarn --version
jessicawilkins@Dedrias-MacBook-Pro-2 ~ % yarn --version
1.22.17
my-app
.yarn create react-app my-app
yarn create v1.22.17
success Installed "[email protected]" with binaries:
- create-react-app
[####################################################################] 68/68
Creating a new React app in /Users/jessicawilkins/Desktop/my-app.
cd my-app
yarn start
which starts your local server for the new React application. http://localhost:3000/
.Ctrl+C
in the command line. example-folder
located on the Desktop.cd Desktop/example-folder
jessicawilkins@Dedrias-MacBook-Pro-2 example-folder %
npx
and hit enter. The space and period at the end of the command are important because it tells the computer to create a new React application in that existing folder.npx create-react-app .
npm
and hit enter.npm init react-app .
Yarn
and hit enter.yarn create react-app .
package.json
package-lock.json
README.md
node_modules