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

202
Visualizações
Webpack - webpack-hot-middleware error for only first change/save

I'm using a bare bones webpack configuration based off the webpack documentation. Currently I'm getting two errors and one warning whenever I save changes. These errors and warning only occur once together after I make the first change. Proceeding changes/saves to my .js files however don't cause any errors or warnings. Does anyone know how to make the below errors/warnings go away, know what causes it and if it will cause problems further in development?

Errors/warning (pastebin because Stackoverflow doesn't like the indentation of the errors):

https://pastebin.com/qEbF2nRs

Picture version:

enter image description here

My Code (pastebin because Stackoverflow doesn't like the indentation of something but I can't find it and it's driving me crazy):

https://pastebin.com/kkrAnfyW

Here's my server.js

const express = require("express");
const webpack = require("webpack");
const webpackDevMiddleware = require("webpack-dev-middleware");
const webpackHotMiddleware = require("webpack-hot-middleware");

// App Setup
const app = express();
// Compiler Setup
const config = require("./webpack.config.js");
const compiler = webpack(config);

// Make express use webpack dev/hot middleware + webpack.config
app.use(webpackDevMiddleware(compiler, {publicPath: config.output.publicPath,}));
app.use(webpackHotMiddleware(compiler));

// Server Listen
app.listen(3000, function () {console.log("Example app listening on port 3000!\n");});

Folder Structure:

enter image description here

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