Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!