February 26, 2023, 6:13pm
I successfully deployed my multi-page react app but when I go to the site link, I get a white blank screen.
Browser console shows these errors
Uncaught syntax error: unexpected token ‘<’ in main.99a0c191.js
Manifest: Line: 1, column: 1, syntax error in manifest.json
I need help asap!!
homepage from your
February 26, 2023, 6:26pm
thanks for the answer, but now I get:
Unexpected Application Error!
404 Not Found
no console errors.
That seems to be coming from your source code, not Netlify.
February 26, 2023, 6:28pm
I used react-router-DOM for linking the pages, can it be from path not correctly defined.
Can’t say without seeing your repo, but that would most likely not be the cause of such an output. This doesn’t feel like an error, rather something hardcoded in your code.
February 26, 2023, 6:39pm
You’ve not defined any element for
const router = createBrowserRouter ([
So, based on your current code, if you go to:
React App, your website works.
February 26, 2023, 6:45pm
The first path is from /, it didn’t render in / so I added /react/my-app
this is my localhost main page
As expected that works as well:
React App, but if you want the home page to have some content, you need to add an element for
February 26, 2023, 6:47pm
what if I add the H1 component for both / and /react/my-app paths
That works too. It’s your website, so you can choose what you want to display on home page.
February 26, 2023, 6:49pm
thanks for the help, much appreciated