phaser-es6-webpack
phaser-es6-webpack copied to clipboard
stack Error: [email protected] deploy: `webpack --config webpack.production.config.js`
I run "npm run deploy". After the build dir created in root dir, the error occured.
- 0 info it worked if it ends with ok
- 1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
- 1 verbose cli 'C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
- 1 verbose cli 'run',
- 1 verbose cli 'deploy' ]
- 2 info using [email protected]
- 3 info using [email protected]
- 4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
- 5 info lifecycle [email protected]~predeploy: [email protected]
- 6 info lifecycle [email protected]~deploy: [email protected]
- 7 verbose lifecycle [email protected]~deploy: unsafe-perm in lifecycle true
- 8 verbose lifecycle [email protected]~deploy: PATH: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\jonanwu\yuanbao-game\three-cards-phaser\node_modules.bin;C:\jdk-8u171\bin;C:\jdk-8u171\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\apache-maven-3.5.3\bin;;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\Go\bin;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\admin\AppData\Roaming\npm;C:\Users\admin\AppData\Local\GitHubDesktop\bin;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Users\admin\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\admin\go\bin
- 9 verbose lifecycle [email protected]~deploy: CWD: C:\jonanwu\yuanbao-game\three-cards-phaser
- 10 silly lifecycle [email protected]~deploy: Args: [ '/d /s /c', 'webpack --config webpack.production.config.js' ]
- 11 silly lifecycle [email protected]~deploy: Returned: code: 2 signal: null
- 12 info lifecycle [email protected]~deploy: Failed to exec deploy script
The error occur from here
- 13 verbose stack Error: [email protected] deploy: webpack --config webpack.production.config.js
- 13 verbose stack Exit status 2
- 13 verbose stack at EventEmitter.
(C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16) - 13 verbose stack at emitTwo (events.js:126:13)
- 13 verbose stack at EventEmitter.emit (events.js:214:7)
- 13 verbose stack at ChildProcess.
(C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) - 13 verbose stack at emitTwo (events.js:126:13)
- 13 verbose stack at ChildProcess.emit (events.js:214:7)
- 13 verbose stack at maybeClose (internal/child_process.js:925:16)
- 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
- 14 verbose pkgid [email protected]
- 15 verbose cwd C:\jonanwu\yuanbao-game\three-cards-phaser
- 16 verbose Windows_NT 10.0.17134
- 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "deploy"
- 18 verbose node v8.11.1
- 19 verbose npm v6.4.0
- 20 error code ELIFECYCLE
- 21 error errno 2
- 22 error [email protected] deploy:
webpack --config webpack.production.config.js
- 22 error Exit status 2
- 23 error Failed at the [email protected] deploy script.
- 23 error This is probably not a problem with npm. There is likely additional logging output above.
- 24 verbose exit [ 2, true ]
I never edit files about webpack or modules. What I edit just in src.
Please, check if the file ẁebpack.producion.config.js
is in the root of your project
Please, check if the file
ẁebpack.producion.config.js
is in the root of your project
Yes. It exist in the root of my project. I set on hook in Jenkins.. When Jenkins run "npm run deploy" , the error make terminal stop running. Actually, despite of this error, files in the build dir are still available and running normally. So I change the command into "npm run deploy || true" to ignore the error. I just worry this error will possibly make some problem in the future.
Maybe Jenkins is needing a finalization command. Something like process.exit()
I'm getting the same error:
ERROR in bundle.js from UglifyJs
Unexpected token: name (Game) [bundle.js:3273,6]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] deploy: webpack --config webpack.production.config.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It seems to be having trouble with "game" in Phaser.
Same error, please fix
My log:
[email protected] dev /Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack webpack
[webpack-cli] Failed to load '/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/webpack.config.js' config
[webpack-cli] TypeError: webpack.optimize.CommonsChunkPlugin is not a constructor
at Object.webpack
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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! /Users/CarlosMartinez/.npm/_logs/2021-06-18T17_03_59_131Z-debug.log