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

585
Visualizações
obtener un encabezado de host no válido de error al cargar el código React en Heroku

Recibo el error invalid host header . No sé el motivo, por favor, si alguien puede ayudar.

.env

 HOST=herokuapp.com

servidor.js

 const express = require('express'); const path = require('path'); const app = express(); app.use(express.static(path.join(__dirname, 'build'))); app.get('*', function (req, res) { res.sendFile(path.join(__dirname, 'build', 'index.html')); }); app.listen(process.env.PORT);

paquete.json

 "proxy": "http://localhost:5000",

cuando escriba Heroku log en la consola devuelva esto si lo ayudará a encontrar alguna solución y gracias a todos por intentarlo

 app[web.1]: Attempting to bind to HOST environment variable: herokuapp.com app[web.1]: If this was unintentional, check that you haven't mistakenly set it in your shell. app[web.1]: Learn more here: https://cra.link/advanced-config app[web.1]: app[web.1]: Could not find an open port at herokuapp.com. app[web.1]: Network error message: listen EADDRNOTAVAIL: address not available 3.218.84.197 app[web.1]: heroku[web.1]: Process exited with status 1 heroku[web.1]: State changed from starting to crashed heroku[web.1]: State changed from crashed to starting heroku[web.1]: Starting process with command `npm start` app[web.1]: app[web.1]: > client@0.1.0 start app[web.1]: > react-scripts start app[web.1]: app[web.1]: Attempting to bind to HOST environment variable: herokuapp.com app[web.1]: If this was unintentional, check that you haven't mistakenly set it in your shell. app[web.1]: Learn more here: https://cra.link/advanced-config app[web.1]: app[web.1]: Could not find an open port at herokuapp.com. app[web.1]: Network error message: listen EADDRNOTAVAIL: address not available 23.21.41.134 app[web.1]: heroku[web.1]: Process exited with status 1 heroku[web.1]: State changed from starting to crashed heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ahmed-radi-bank-system.herokuapp.com request_id=1fe76374-c2b2-4742-8274-ac29595f176b fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ahmed-radi-bank-system.herokuapp.com request_id=729f1256-9d7e-4cfa-83e7-0fcb59b886a2 fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ahmed-radi-bank-system.herokuapp.com request_id=7cea8936-c5d5-4171-9c79-e6795e805cc9 fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ahmed-radi-bank-system.herokuapp.com request_id=581a5de7-c23d-496e-a27f-5ade070cc55b fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Subiré mi proyecto a Netify

about 4 years ago · Juan Pablo Isaza Relatório
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