How are you? I'm taking my first steps with webpack
and I found a problem that I can not solve, when trying to make the build of a file js
, I get the following error:
webpack test.js app.js
The CLI moved into a separate package: webpack-cli
Would you like to install webpack-cli? (That will run npm install -D webpack-cli) (yes/NO)yes
When you give yes the installation starts, which ends with the following error:
npm WARN deprecated [email protected]: Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info. D: _PROJECTS \ deploy '- [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules \ chokidar \ node_modules \ fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os": "darwin", "arch": "any"} (current: {"os": "win32", "arch": "x64"}) {Error: Can not find module 'webpack-cli' at Function.Module._resolveFilename (module.js: 469: 15) at Function.Module._load (module.js: 417: 25) at Module.require (module.js: 497: 17) at require (internal / module.js: 20: 19) at runCommand.then.result (C: \ Users \ santa 64 \ AppData \ Roaming \ npm \ node_modules \ webpack \ bin \ webpack.js: 62: 14) at process._tickCallback (internal / process / next_tick.js: 109: 7) code: 'MODULE_NOT_FOUND'}
Then I try again to execute the webpack
command to make the build
webpack test.js app.js
But again I get the same mistake and I can not continue.