[Solved] Webpack error static heartbeat interval = 1000

An error is reported when packaging with NPX webpack serve
the following error is displayed
static heartbeat interval = 1000;

SyntaxError: Unexpected token =

Information about installing webpack
“webpack”: “^ 5.64.4”,
“webpack cli”: “^ 4.9.1”,
“webpack dev server”: “^ 4.6.0”

node version is too low

install the latest node version
because webpack dev server v4 0.0 + node >= v12.13.0, webpack >= v4.37.0

Read More: