ao executar o comando npm run build-dev recebo o seguinte erro:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build-dev' ]
2 info using npm@6.1.0
3 info using node@v10.4.0
4 verbose run-script [ 'prebuild-dev', 'build-dev', 'postbuild-dev' ]
5 info lifecycle client@1.0.0~prebuild-dev: client@1.0.0
6 info lifecycle client@1.0.0~build-dev: client@1.0.0
7 verbose lifecycle client@1.0.0~build-dev: unsafe-perm in lifecycle true
8 verbose lifecycle client@1.0.0~build-dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\devFiles\webPack\projeto-webpack\client\node_modules\.bin;c:\Program Files (x86)\Java\jre1.8.0_72\bin\bin;#C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\oracle\product\11.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Adobe\Reader 11.0\Reader;C:\Windows\CCM;C:\Program Files (x86)\Kodak\Document Imaging\kds_i2000\Smart Touch\;C:\WINDOWS\CCM;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\apache-maven-3.5.4\bin;C:\Program Files\MySQL\MySQL Server 8.0;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\ffmpeg\bin\;C:\Program Files\Git\cmd;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Python27;C:\ProgramData\ComposerSetup\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\instantclient-basic-win-ia64-10.2.0.3.0\instantclient_10_2\;c:\Program Files (x86)\Java\jre1.8.0_72\bin\bin;C:\Users\viniciusbraga\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\viniciusbraga\AppData\Roaming\npm;C:\Program Files (x86)\Cntlm;C:\Program Files\apache-maven-3.5.4\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\php7;C:\Users\viniciusbraga\AppData\Roaming\Composer\vendor\bin;C:\Users\viniciusbraga\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\instantclient-basic-win-ia64-10.2.0.3.0\instantclient_10_2;C:\xampp\php;
9 verbose lifecycle client@1.0.0~build-dev: CWD: C:\devFiles\webPack\projeto-webpack\client
10 silly lifecycle client@1.0.0~build-dev: Args: [ '/d /s /c', 'wepback --config webpack.config.js' ]
11 silly lifecycle client@1.0.0~build-dev: Returned: code: 1 signal: null
12 info lifecycle client@1.0.0~build-dev: Failed to exec build-dev script
13 verbose stack Error: client@1.0.0 build-dev: `wepback --config webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid client@1.0.0
15 verbose cwd C:\devFiles\webPack\projeto-webpack\client
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-dev"
18 verbose node v10.4.0
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error client@1.0.0 build-dev: `wepback --config webpack.config.js`
22 error Exit status 1
23 error Failed at the client@1.0.0 build-dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
webpack.config.js
const path = require('path');
module.exports = {
entry: './app-src/app.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname , 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
}
}