glook / webpack-typescript-react

Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
MIT License
218 stars 54 forks source link

fix issue with webpack-cli and argument in wrong order #6

Closed jonizen closed 3 years ago

jonizen commented 3 years ago

Hi!

Nice work, I tried it out and it gives me an error when running npm run start with the latest node and npm version (15.5.0) after looking at the error message (node:50249) UnhandledPromiseRejectionWarning: TypeError: Class constructor ServeCommand cannot be invoked without 'new' I looked at the webpack-cli repo and found Error when run npm start: Class constructor ServeCommand cannot be invoked without 'new': which have reported the error.

In short, the order needs to be: Syntax - webpack [command] [options] and the latest webpack needs to be 4.3.1.

Cheers!