I just downloaded phaser from a zip file. I copied the 4 .js files from source into a js folder. I started a tutorial. I’m using Wamp server. When I called localhost/filename I immediately got an error:
Uncaught ReferenceError: require is not defined http://localhost/phaser_1/js/phaser.js:7
On that line, phaser has a require polyfills. I added the polyfills folder to the other js files, but got the same error after a refresh. Then I added all the folders and still got the same error.
I was using the wrong phaser file in the zip folder. I used the file out of the src directory, but the file I was supposed to use was in another directory where they also put the minified version. I don’t understand why there were 2 phaser.js files and one didn’t work but I’m sure there is some reason for it. I probably should use npm but it’s enough just getting back to what I’m doing now. It’s working and I am going through some tutorials. Thanks for answering. Appreciate it.