Quando utilizo esse comando :
npm run build-dev
Recebo o seguinte erro:
> client@1.0.0 build-dev /home/prop8/Documentos/Carreira Programador Angular/Webpack: Manipulando módulos/projeto-webpack/client
> webpack --config webpack.config.js
sh: 1: webpack: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@1.0.0 build-dev: `webpack --config webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the client@1.0.0 build-dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/prop8/.npm/_logs/2018-08-02T14_27_39_468Z-debug.log
Mas quando faço a seguinte modificação no package.json funciona certinho
"build-dev": "node_modules/webpack/bin/webpack.js --config webpack.config.js"
ash: 1c01b5d92a6aeac96560
Version: webpack 4.16.4
Time: 528ms
Built at: 2018-08-02 10:32:52
Asset Size Chunks Chunk Names
bundle.js 11 KiB 0 [emitted] main
Entrypoint main = bundle.js
[0] ./app-src/app.js + 24 modules 21.2 KiB {0} [built]
| ./app-src/domain/negociacao/NegociacaoService.js 2.44 KiB [built]
| ./app-src/app.js 511 bytes [built]
| ./app-src/domain/index.js 186 bytes [built]
| ./app-src/domain/negociacao/NegociacaoDao.js 1.87 KiB [built]
| ./app-src/ui/index.js 257 bytes [built]
| ./app-src/domain/negociacao/Negociacao.js 719 bytes [built]
| ./app-src/domain/negociacao/Negociacoes.js 474 bytes [built]
| ./app-src/controllers/NegociacaoController.js 5.58 KiB [built]
| ./app-src/util/index.js 374 bytes [built]
| ./app-src/ui/views/MensagemView.js 218 bytes [built]
| ./app-src/util/Obrigatorio.js 107 bytes [built]
| ./app-src/util/decorators/Controller.js 996 bytes [built]
| ./app-src/util/Bind.js 296 bytes [built]
| ./app-src/util/decorators/Debounce.js 436 bytes [built]
| ./app-src/util/HttpService.js 265 bytes [built]
| + 10 hidden modules
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
Process finished with exit code 0
Por acaso o Sr. já passou por isso ? Tem solução? ] Sim, Já olhei na internet mais não conseguir entender.