Я скачал существующий веб-проект и попытался запустить: webpack --watch --progress
, но он продолжает говорить:
webpack --watch --progress
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN @ngtools/webpack@1.10.2 requires a peer of webpack@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror@1.1.3 requires a peer of @angular/core@^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror@1.1.3 requires a peer of @angular/forms@^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror@1.1.3 requires a peer of @angular/common@^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@2.11.3 requires a peer of webpack@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ webpack-cli@3.1.2
added 2 packages from 2 contributors, removed 1 package, updated 3 packages and audited 24726 packages in 16.453s
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
{ Error: Cannot find module 'webpack-cli'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at runCommand.then (...\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:142:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
Требуется ли WebPack конкретная версия NPM / Node?(возможно, более новая версия не совместима со старой) ..