Reputation: 61
I am working on a react app
When I run yarn start
It runs the app and redirects to http://localhost:300/ngo
and I havent given any redirect or such route in the whole code
This is my App.js router
<Router>
<div className="app">
<Switch>
<Route path="/" exact>
<Home />
</Route>
<Route path="/login" exact>
<Login />
</Route>
<Route path="/admin" exact>
<Admin />
</Route>
<Route path="/profile" exact>
<MyProfile />
</Route>
</Switch>
</div>
</Router>
);
What all are the possible errors or Fix ?
Upvotes: 1
Views: 58
Reputation: 61
So I got the error
It was that in the package.json
the homepage was given as https://<url>/ngo
because of which this was happening
Upvotes: 1