Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
React router interfere with package.json homepage when deployed on github pages

I am using react router dom with react and deployed on github pages. My problem is that package.json requires settings to build the github link followed by the / and the name of the repo or project.

{
  "name": "self-destructed-messages",
  "homepage": "http://username.github.io/self-destructed-messages/",
  "version": "0.1.0",

I tried with https also and the pages, even the localhost is redirecting me to the error not found page

const RouterConfig = () => {
  return (
    <div>
        <Routes>

                <Route exact path='/' element={<Home />} />
                <Route path='/created-message/:string' element={<CreatedMessages />} />
                <Route path='/get-message/:string' element={<GetMessage />} />
                <Route path='*' element={<NotFounded />} />


        </Routes>
    </div>
  )
}

When I open the github pages it goes automatically to the 404 page (NotFounded). If I am using the / only, I get the github official 404...

I dont know what else to try. Can please have some help? Thanks, Daniel

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda