Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors #2

Open
michalfialadev opened this issue Sep 23, 2021 · 0 comments
Open

Errors #2

michalfialadev opened this issue Sep 23, 2021 · 0 comments

Comments

@michalfialadev
Copy link

Hi, trying to make your project work - no bueno:

  1. since you installed parcel with -g flag, i had to add it manually into project, so
    npm init
    npm install
    npm install parcel-bundler --save-dev

  2. npm start, i get warnings and errors in browser's console:

`phaser.js:74289 generateFrameNames: Frame missing: run-down-1.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-2.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-3.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-4.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-5.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-6.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-7.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-8.png from texture: faune
generateFrameNames @ phaser.js:74289
createCharacterAnims @ CharacterAnims.ts:21
phaser.js:74289 generateFrameNames: Frame missing: run-up-1.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-2.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-3.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-4.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-5.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-6.png from texture: faune

[MANY MORE WARNINGS HERE]

[AND AT THE END, FOLLOWING WARNING:]

phaser.js:135325 createStaticLayer is deprecated. Use createLayer

[AND FOLLOWING ERROR:]

phaser.js:43946 Uncaught TypeError: Cannot read properties of undefined (reading 'texture')
at AnimationState.setCurrentFrame (phaser.js:43946)
at AnimationState.handleStart (phaser.js:43412)
at AnimationState.startAnimation (phaser.js:43392)
at AnimationState.play (phaser.js:43266)
at new Faune (Faune.ts:44)
at GameObjectFactory.faune (Faune.ts:243)
at Game.create (Game.ts:54)
at SceneManager.create (phaser.js:100338)
at SceneManager.bootScene (phaser.js:100218)
at SceneManager.start (phaser.js:100926)`

  1. Game.ts shows errors in VSCode (Line 47):
    map.createStaticLayer('Ground', tileset)
    The error is on 'createStaticLayer': "Property 'createStaticLayer' does not exist on type 'Tilemap'.ts(2339)"

  2. package.json phaser version:
    "dependencies": { "phaser": "^3.22.0" },
    is the same as what you're using, so why can't it recognize that method? Did you by chance upgrade without testing?

  3. when i change 'createStaticLayer' to 'createLayer', i get the same warnings (except the last one), and following error:
    phaser.js:43946 Uncaught TypeError: Cannot read properties of undefined (reading 'texture')

I suppose the parcel package didn't properly locate the files in the filesystem (i see you using the static files copy 'public' and cleanpaths plugin, i suppose the former fails to locate the files). Can you recheck and fix your repo? (or update your tldr installation guide).

Cheers hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant