React App Works on local host - not on Workers Site

I have some simple code that creates a Route to different urls on my website.

It works great on my local host. I can type in the URL and it loads up nicely.

But, my Workers site cannot find the URLs. It says:
“could not find login/index.html in your content namespace” and “could not find signup/index.html in your content namespace”

I am just trying to access different URLs on my site. Anyone know any solutions?
//Pages
import home from “./pages/home”;
import login from “./pages/login”;
import signup from “./pages/signup”;

function App() {
return (

); }

Screen Shot 2020-06-23 at 1.55.40 PM

I have some simple code that creates a Route to different urls on my website.

It works great on my local host. I can type in the URL and it loads up nicely.

But, my Workers site cannot find the URLs. It says:
“could not find login/index.html in your content namespace” and “could not find signup/index.html in your content namespace”

I am just trying to access different URLs on my site. Anyone know any solutions?

Screen Shot 2020-06-23 at 1.55.40 PM

I’m also interested in the same question. I would like to have all routes pass through to index.html.

I am also trying to use React Router in my Cloudflare Workers Sites project and am running into the same issue. Would love to hear whether there’s a solution to this or whether it’s just not possible to use React Router with Workers Sites?

I think this answer should solve your problem:

1 Like

Woa thanks, it worked!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.