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”
reason
node version is too low
Solution
install the latest node version
because webpack dev server v4 0.0 + node >= v12.13.0, webpack >= v4.37.0
Read More:
- How to Fix Webpack run error webpack dev server
- [Solved] Webpack compilation Error: Cannot find module’webpack-cli/bin/config-yargs’
- webpack4 Use webpack-dev-server Error [How to Solve]
- NPM start project error: cannot find module ‘webpack’ problem solution
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- Error: cannot find module ‘webpack cli/bin/config yargs’‘
- When starting Vue project: cannot find module ‘webpack cli / bin / config yargs’ error resolution
- [Solved] Bindingadapter error and needs to be static
- How to Solve Error: Cannot find module ‘webpack/lib/RequestShortener’
- Webpack Error: Module build failed: TypeError: this.getOptions is not a function
- Some problems encountered in the initial construction of Ant Design Pro project, such as cross Env, webpack and so on
- How to Solve webpack -v View Error in vsode
- How to Solve Webpack CacheGroups Error
- Webpack packaging error TypeError: this.getOptions is not a function at Object.lessLoader
- Webpack Pack and compress ES6 files with errors: ERROR in js/xxxxxx.js from UglifyJs Unexpected token punc ()
- Cssssyntax error in webpack [How to Solve]
- [Solved] error: external/googletest/googletest: MODULE.TARGET.STATIC_LIBRARIES.libgtest already defined
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- [Solved] WebPack Error: Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reache