Reputation: 2570
I have webpack v4 and webpack-cli installed via npm. I am running this command...
webpack-cli init
I keep getting an Unknown command 'webpack-cli error? This is my package.json
"devDependencies": {
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11"
}
Upvotes: 1
Views: 1974
Reputation: 4322
You need to install webpack-cli
globally in order to use it like that:
$ npm i -g webpack-cli
if you don't want to install it global you can use npx
$ npx webpack-cli init ...
npx helps to execute local packages.
Upvotes: 1