I created a new React App and npm start was working in localhost. After I closed it and went back later npm start will not open in the browser. I reinstalled everything and the exact same thing happened again. I tried installing react-scripts globally. Nope. Same thing. I deleted node_modules and still nothing. I tried removing babel from my package.json. Nothing. I cleared my cache from the browser. Nothing. Any help would be great. I have made many React Apps and never had anything like this.
Here is my package.json:
{
"name": "johnny_auth1_app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^4.5.3",
"react": "^17.0.1",
"react-bootstrap": "^1.4.0",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.1",
"styled-components": "^5.2.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Here is my App.js:
import './App.css';
import Home from './Components/Home';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import { NavigationBar } from './Components/NavigationBar';
const App = () => {
return (
<Router>
<NavigationBar />
<div classname='App'>
<Switch>
<Route exact path='/' component={Home}/>
</Switch>
</div>
</Router>
);
};```