Webpack-cli: 'webpack serve' command fails after dependency updates

Created on 8 Feb 2021  路  5Comments  路  Source: webpack/webpack-cli

Describe the bug

After recent dependency updates, webpack cli gives me this error.

$ export SERVER_URL=${SERVER_URL:-'http://localhost:8080'} DEV_PORT=${DEV_PORT:-3000} ; NODE_ENV=development webpack serve --config config/webpack.client.dev.js
[webpack-cli] TypeError: cli.isValidationError is not a function
    at Command.<anonymous> (/home/user/Desktop/someFolder/client/node_modules/@webpack-cli/serve/lib/index.js:96:25)
error Command failed with exit code 2.

which points me to the this code snippet

            catch (error) {
                if (cli.isValidationError(error)) {
                    logger.error(error.message);
                }
                else {
                    logger.error(error);
                }
                process.exit(2);
            }

What is the current behavior?
Cannot find the reference for the isValidationError function
**TypeError: cli.isValidationError is not a function**

To Reproduce
Start the dev-server after recent updates

Expected behavior

Webpack dev-server should start successfully.

Screenshot of the dependency updates

dep_updates_of_webpack-cli

Bug

Most helpful comment

You need to upgrade your webpack-cli too

All 5 comments

Checking

You need to upgrade your webpack-cli too

will try thanks

Yes, after [email protected], it works :tada:

Great, closing

Was this page helpful?
0 / 5 - 0 ratings