jmeyers919 Posted July 22, 2015 Share Posted July 22, 2015 I'm attempting to get started with Phaser (2.4.0), but whenever I require phaser into my project, I receive this error:Uncaught TypeError: Cannot read property 'prototype' of undefinedat phaser:35790 which refers to this line:Phaser.TileSprite.prototype = Object.create(PIXI.TilingSprite.prototype);Just above this line is the definition for the Phaser.TileSprite class, so the error must be referring to PIXI.TilingSprite.prototype. I've tried manually inserting PIXI into the window object like this:window.PIXI = require("pixi.js");But this does not solve the issue. If anyone else has run into this issue and could tell me what I'm doing wrong, that would be much appreciated. Here's some additional information: Javascript build task (gulp):gulp.task("babel", () => { return browserify("./lib/app.js", {debug: true}) .transform(babelify.configure({ ignore: /node_modules/ })) .bundle() .on("error", function(error) { console.log(`Babel Error: ${error}`); this.emit("end"); // keeps task from hanging on error }) .pipe(fs.createWriteStream("./bin/app.js"));}); dependencies:"devDependencies": { "babel": "^5.8.3", "babel-core": "^5.8.3", "babelify": "^6.1.3", "browserify": "^11.0.0", "browserify-incremental": "^3.0.1", "express": "^4.13.1", "gulp": "^3.9.0", "gulp-ruby-sass": "^1.0.5", "lodash": "^3.10.0"},"dependencies": { "pixi.js": "^3.0.7", "phaser": "^2.4.0"} Link to comment Share on other sites More sharing options...
rich Posted July 22, 2015 Share Posted July 22, 2015 https://github.com/photonstorm/phaser/issues/1926#issuecomment-123852770 Link to comment Share on other sites More sharing options...
jmeyers919 Posted July 22, 2015 Author Share Posted July 22, 2015 https://github.com/photonstorm/phaser/issues/1926#issuecomment-123852770 Thank you. I guess I should have just posted an issue. Link to comment Share on other sites More sharing options...
Recommended Posts