Webpack and webpack-cli, are installed but an error is reported by running the webpack command _

the version of webpack installed is 4.9.1. The webpacklycli version number is 2.1.4. Run the webpack command prompt:
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:

We will use "npm" to install the CLI via "npm install-D".
Which one do you like to install (webpack-cli/webpack-command):

Mar.15,2021

Global installation of webpack and webpack-cli
npm install webpack- g
npm install webpack-cli-g
and then local installation of webpack and webpack-cli
npm install webpack--save-dev
npm install webpack-cli-- save-dev
personal test is valid ~


sudo cnpm install webpack-cli-g

/ linux non-root users require sudo authorization.


you need to install a webpack-cli
npm webpack-cli-g
.

or npm webpack-command-g (this is not tested)


npx webpack is fine, npx for version 4.x

Menu