nkholski / phaser3-es6-webpack

Generic platformer and Phaser 3 bootstrap project
http://metroid.niklasberg.se/phaser3platformer/
701 stars 141 forks source link

npm run deploy fails #2

Closed kfern closed 7 years ago

kfern commented 7 years ago

npm run dev works fine :-)

npm run deploy fails:

ERROR in multi pixi p2 phaser webfontloader Module not found: Error: Can't resolve 'p2' in 'phaser3-es6-webpack' @ multi pixi p2 phaser webfontloader

ERROR in multi pixi p2 phaser webfontloader Module not found: Error: Can't resolve 'phaser' in 'phaser3-es6-webpack' @ multi pixi p2 phaser webfontloader

ERROR in ./src/main.js Module not found: Error: Can't resolve 'phaser' in 'phaser3-es6-webpack/src' @ ./src/main.js 3:0-17 @ multi babel-polyfill ./src/main.js

ERROR in multi pixi p2 phaser webfontloader Module not found: Error: Can't resolve 'pixi' in 'phaser3-es6-webpack' @ multi pixi p2 phaser webfontloader

npm ERR! Linux 4.4.0-93-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "deploy" npm ERR! node v6.11.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! Phaser3ES6Webpack@1.0.0 deploy: webpack --config webpack.production.config.js npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the Phaser3ES6Webpack@1.0.0 deploy script 'webpack --config webpack.production.config.js'.

In webpack.production.config.js

// Phaser webpack config
var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/')
var phaser = path.join(phaserModule, 'build/custom/phaser-split.js')
var pixi = path.join(phaserModule, 'build/custom/pixi.js')
var p2 = path.join(phaserModule, 'build/custom/p2.js')

Build folder doesn't exist

nkholski commented 7 years ago

I never tried deploy myself. It's parts from the repository I clone I've missed to delete for deploy. I'll look into it when I update the repository for Phaser 3 beta 1.

nkholski commented 7 years ago

Should work now (dist is created)

kfern commented 7 years ago

Thanks. Now npm run deploy wotks fine and create dist folder with bundle.js, bundle.js.map, vendor.bundle.js and vendor.bundle.js.map files.