Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack Error: PhaserES6Webpack@1.2.1 deploy: webpack --config webpack.production.config.js #78

Open
boas19910115 opened this issue Oct 9, 2018 · 6 comments

Comments

@boas19910115
Copy link

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 npm@6.4.0
  • 3 info using node@v8.11.1
  • 4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
  • 5 info lifecycle PhaserES6Webpack@1.2.1~predeploy: PhaserES6Webpack@1.2.1
  • 6 info lifecycle PhaserES6Webpack@1.2.1~deploy: PhaserES6Webpack@1.2.1
  • 7 verbose lifecycle PhaserES6Webpack@1.2.1~deploy: unsafe-perm in lifecycle true
  • 8 verbose lifecycle PhaserES6Webpack@1.2.1~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 PhaserES6Webpack@1.2.1~deploy: CWD: C:\jonanwu\yuanbao-game\three-cards-phaser
  • 10 silly lifecycle PhaserES6Webpack@1.2.1~deploy: Args: [ '/d /s /c', 'webpack --config webpack.production.config.js' ]
  • 11 silly lifecycle PhaserES6Webpack@1.2.1~deploy: Returned: code: 2 signal: null
  • 12 info lifecycle PhaserES6Webpack@1.2.1~deploy: Failed to exec deploy script

The error occur from here

- 13 verbose stack Error: PhaserES6Webpack@1.2.1 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 PhaserES6Webpack@1.2.1
  • 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 PhaserES6Webpack@1.2.1 deploy: webpack --config webpack.production.config.js
  • 22 error Exit status 2
  • 23 error Failed at the PhaserES6Webpack@1.2.1 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.

@boas19910115 boas19910115 changed the title 13 verbose stack Error: PhaserES6Webpack@1.2.1 deploy: webpack --config webpack.production.config.js stack Error: PhaserES6Webpack@1.2.1 deploy: webpack --config webpack.production.config.js Oct 9, 2018
@lean
Copy link
Owner

lean commented Oct 9, 2018

Please, check if the file ẁebpack.producion.config.js is in the root of your project

@boas19910115
Copy link
Author

boas19910115 commented Oct 10, 2018

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.

@lean
Copy link
Owner

lean commented Oct 10, 2018

Maybe Jenkins is needing a finalization command. Something like process.exit()

@DevMerlin
Copy link

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! PhaserES6Webpack@1.0.0 deploy: webpack --config webpack.production.config.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the PhaserES6Webpack@1.0.0 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.

@charliemr99
Copy link

Same error, please fix

@charliemr99
Copy link

My log:

PhaserES6Webpack@1.2.1 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. (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/webpack.config.js:31:5)
at Module._compile (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at WebpackCLI.tryRequireThenImport (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:32:22)
at loadConfig (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:1536:38)
at WebpackCLI.resolveConfig (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:1639:44)
at WebpackCLI.createCompiler (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:2045:33)
at WebpackCLI.buildCommand (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:2173:31)
at Command. (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/lib/webpack-cli.js:850:36)
at Command.listener [as _actionHandler] (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/node_modules/commander/index.js:922:31)
at Command._parseCommand (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/node_modules/commander/index.js:1503:14)
at Command._dispatchSubcommand (/Users/CarlosMartinez/UNAL/UN_Pokemon/phaser-es6-webpack/node_modules/webpack-cli/node_modules/commander/index.js:1443:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! PhaserES6Webpack@1.2.1 dev: webpack
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the PhaserES6Webpack@1.2.1 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants