# React-Router url path issues

**URL:** <https://discourse.sst.dev/t/react-router-url-path-issues/1771>\
**Category:** Chapter Comments\
**Created:** [April 17, 2020, 11:08pm UTC](https://discourse.sst.dev/t/react-router-url-path-issues/1771 "2020-04-17T23:08:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)\
**Post date:** [April 17, 2020, 11:08pm UTC](https://discourse.sst.dev/t/react-router-url-path-issues/1771/1 "2020-04-17T23:08:31Z")

</div>

I am trying to do the [create note step](https://serverless-stack.com/chapters/add-the-create-note-page.html) of the tutorial.

However, my react-router is acting super weird.

Instead of rendering the component, it looks for `localhost:8080/notes/main.js` and throws a 404 error.  
When I try a simple path with no extra slash `/notes` for example it renders fine.

Here is my Routes.js:

```
import React from 'react'
import { Route, Switch } from "react-router-dom";
import Home from "./containers/Home";
import Login from "./containers/Login";
import NotFound from "./containers/NotFound";
import Signup from "./containers/Signup";
import NewNote from "./containers/NewNote";

export default function Routes( props ) {
  return (
    <Switch>
      <Route path="/" exact component={Home} />
      <Route path="/notes/login" exact component={Login} />
      <Route exact path="/signup" component={Signup}/>
      <Route exact path="/notes/new" component={NewNote} />
      { /* Finally, catch all unmatched routes */ }
      <Route component={NotFound} />
    </Switch>
  );
}

```

If you want to see more code and screenshots then this is my StackOverflow post as it’s not easy adding everything his in Discourse.

> <https://stackoverflow.com/questions/61265006/react-router-returning-404-trying-to-return-file-source-instead-of>

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [April 25, 2020, 4:58pm UTC](https://discourse.sst.dev/t/react-router-url-path-issues/1771/2 "2020-04-25T16:58:20Z")

</div>

Btw, are you starting Create React App on port 8080 instead of the default?

---

<div class="post-metadata">

**Author:** ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)\
**Post date:** [April 28, 2020, 4:50pm UTC](https://discourse.sst.dev/t/react-router-url-path-issues/1771/3 "2020-04-28T16:50:55Z")

</div>

I don’t use create-react-app, I have some hefty experience with react and webpack so I built it myself. But yes I’m using 8080 for my port using webpack dev server plugin.  
The other routes work just found, just not any nested routes.

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [May 3, 2020, 1:09am UTC](https://discourse.sst.dev/t/react-router-url-path-issues/1771/4 "2020-05-03T01:09:43Z")

</div>

Ah I see. I don’t know if I can be of much help. You might have to ask on Stack Overflow?
