I am starting to learn react. And following the tutorials, the first thing I do is create a react app using 'create-react-app'.
Though, it gave me a few high-severity vulnerabilities pasted below-
Creating a new React app in /Users/girishtiwale/Dropbox/#Girish/My_Workspace/react_practice/new-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
added 1393 packages in 31s
203 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New patch version of npm available! 8.15.0 -> 8.15.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.1
npm notice Run npm install -g [email protected] to update!
npm notice
Initialized a git repository.
Installing template dependencies using npm...
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
added 52 packages in 4s
203 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New patch version of npm available! 8.15.0 -> 8.15.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.1
npm notice Run npm install -g [email protected] to update!
npm notice
Removing template package using npm...
removed 1 package, and audited 1445 packages in 1s
203 packages are looking for funding
run `npm fund` for details
6 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New patch version of npm available! 8.15.0 -> 8.15.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.1
npm notice Run npm install -g [email protected] to update!
npm notice
Created git commit.
Success! Created new-app at /Users/girishtiwale/Dropbox/#Girish/My_Workspace/react_practice/new-app
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd new-app
npm start
Happy hacking!
npm notice
npm notice New patch version of npm available! 8.15.0 -> 8.15.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.1
npm notice Run npm install -g [email protected] to update!
npm notice
But when I don 'npm start', the console displays 'Starting the development server ...', it opens a browser tab with localhost:3000 automatically, and then nothing happens...
CodePudding user response:
wait till the end of process started. Take some time. Two ways could be later - error or happy start. In case of error share the error first. Check the console
CodePudding user response:
Are you using npx create-react-app <name-of-your-app>
to create the app?
If so maybe use npm run start
to start your application it should be located in your package.json section example is:
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "NODE_ENV=production node server.js",
"lint": "next lint"
},
so in this case you would run npm run "dev"
as npm run dev
CodePudding user response:
Maybe you forgot to go inside the folder before 'npm start'.
As it says, you have to:
cd new-app
npm start
CodePudding user response:
can you tell us what is written in your scripts in package.json this should be something like this
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
and what is your node version?