I'm trying to test a custom Webpack configuration. I've read that instead of typing node ./node_modules/webpack/bin/webpack.js
, I can use npx webpack
. But I can't seem to get it to work.
user@comp:~/raw> npx webpack
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
When I switch to running npx webpack-cli
, I get a different error:
user@comp:~/> npx webpack-cli
npx: installed 489 in 19.186s
Cannot find module 'webpack'