lean / phaser-es6-webpack

A bootstrap project for create games with Phaser + ES6 + Webpack.
MIT License
1.28k stars 316 forks source link

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

Open boas19910115 opened 5 years ago

boas19910115 commented 5 years ago

I run "npm run deploy". After the build dir created in root dir, the error occured.

The error occur from here

- 13 verbose stack Error: PhaserES6Webpack@1.2.1 deploy: webpack --config webpack.production.config.js

I never edit files about webpack or modules. What I edit just in src.

lean commented 5 years ago

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

boas19910115 commented 5 years ago

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 commented 5 years ago

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

DevMerlin commented 5 years ago

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 commented 3 years ago

Same error, please fix

charliemr99 commented 3 years ago

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