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

331
Visualizações
Vercel configuration breaks Nextjs v12 hot reloading

I'm using Vercel platform to develop a NodeJS app with two separate folders - frontend (NextJS v12 app) and backend (custom NodeJS with Express). I've set up a minimal example, but after upgrading to NextJS v12, hot reloading stopped working.

I've seen that it's because of the new usage of websockets for HMR at NextJS v12. But didn't find any answer.

This is my vercel.json file:

  "version": 2,
  "builds": [
    { "src": "/backend/index.js", "use": "@now/node" },
    {
      "src": "/frontend/package.json",
      "use": "@now/next"
    }
  ],
  "rewrites": [
    { "source": "/backend/(.*)", "destination": "/backend/index.js" },
    { "source": "/(.*)", "destination": "/frontend/$1" }
  ]
}

and this is the error: WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr' failed

Do you have any ideas what to do with it? This is a related issue on NextJS GitHub: https://github.com/vercel/next.js/issues/30491, but no one is mentioning this problem related to the Vercel configuration file. Thanks.

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