mkdir demo & cd demo
npm init -y
npm i --save-dev webpack webpack-cli
npm i webpack-cli @webpack-cli/init
npx webpack-cli init
but when run
npx webpack-cli init
i get the error
init isn't a valid name.
It should be prefixed with 'webpack-scaffold', but have different suffix.
How can I solve it?
Try to use @webpack-cli/[email protected].
There are some problems with 0.3 https://github.com/webpack/webpack-cli/issues/1127
Also in webpack-cli@beta (v4), they renamed init to create.
use npx webpack-cli create instead npx webpack-cli init
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With