webpack / webpack-dev-server

Serves a webpack app. Updates the browser on changes. Documentation https://webpack.js.org/configuration/dev-server/.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After the latest webpack-dev-server upgrade, not able to start the server

adityasriivatsalan opened this issue · comments

Hi, I recentely upgraded my webpack-dev-server version from 4.15.1 to 5.0.2 and after that I am not able to start my npm server.

Bug report

when I start my npm server using npm start I am getting errors attached in the screenshot.
Webpack versions

    "webpack": "^5.90.3",
    "webpack-bundle-analyzer": "^4.10.1",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "^4.15.1",
    "webpack-merge": "^5.10.0"

Actual Behavior

This error occurs only when I update webpack-dev-server to latest. I upgraded all the other packages except webpack-dev-server and I was able to start the server but once I upgraded webpack-dev-server this issue occures.

Expected Behavior

It should start and say "Compiled Successfully" instead of breaking it.

How Do We Reproduce?

Here's the screenshot on what happens when I start the npm
image

Please paste the results of npx webpack-cli info here, and mention other relevant information

@adityasriivatsalan Only providing the screenshot is not helpful, can you provide a minimal github repo to reproduce the error.

Also, make sure you're using Node.js version 18.12.0 or later

@snitin315 I upgraded node to 20 and tried and fixed the problem. Thanks.