Closed rjamesnw closed 7 years ago
I have the same problem. It seems that you have to cd
to node_modules/phaser
and then npm i
and npm run build
. Then it will create a ../../phaser3-examples
folder.
This means that you have a node_modules inside node_modules....maybe this is just a temporary setup?
You shouldn't need to do this. I'm curious what the is-fullwidth-code-point module is. That isn't something Phaser uses. I thought maybe the webpack-shell-plugin used it, but it doesn't seem to.
I have updated the copy-to-examples
shell script today, so it will check to see if you've got the Phaser 3 Examples repo locally before trying to copy to it, and fail gracefully if you don't. It might have just been that which was causing it. Have released beta3 today, so might be worth testing against that?
The point is that npm run build
won't work because there is no package.json
file in the folder after running those commands in the guide. I only have node_modules
and package-lock.json
so the package.json needs to be added manually?
True. That's really weird because all of those things exist. It must be a limitation of publishing a package from within a sub-folder. Or something is wrong in the package.json
we're using, although I can't see what, it's really basic.
Yeah, appears it can't be done: https://stackoverflow.com/questions/38935176/how-to-npm-publish-specific-folder-but-as-package-root
For now, I'll update the guide until we move over the v3 folder to be the root of the repo in the coming weeks.
Just did npm update
then npm run build
inside node_modules\phaser
and it works now, thanks. ;)
I updated the getting started guide today and also the webpack project template to address the issues raised here, so am closing for now.
I think you are missing a step in your instructions on this page in the "Download from NPM" section (doesn't build as easily as described): https://phaser.io/phaser3/gettingstarted
I did this:
Then I get this:
Any ideas?