Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
React - Doesn't work refreshing page on react app

I am building front-end of marketplace using react. "react": "^17.0.2" "react-redux": "^7.2.5" "react-scripts": "4.0.3" @reach/router": "^1.3.4"

After built the app on local or netlify, when refreshing page(F5), it doesn't work and it returns blank page. In details, "404: The requested path could not be found" on local, and then blank page with console error on netlify.

But, it does work well on local dev(yarn start) and from clicking menu after built.

I had already tried to add "homepage":"." on package.json and _redirects file with /* /index.html 200 on root and build folder.

I am not sure whether it is build setting problem or @reach/router issue.

How can I fix this issue?

Hope to your quick help.

Thank you,

PS: Attached my issue screenshots.

Error on local

Error on netlify

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

create a .htaccess file in the public directory of your react project and paste the text below.

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]

When built again and re-uploaded it should not have an error on reload.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda