Jump to content

Error when upgrading to > [email protected] when creating spritesheet


Recommended Posts


We are currently using the [email protected]. Our game is deployed to both android and iOS platforms so we use ASTC compressed textures with the pixi-compressed-textures plugin (https://github.com/pixijs/pixi-compressed-textures). I would like to upgrade to at least the latest minor version 5.3.12. However if I upgrade to even the next minor version 5.3.1 I get the following error:

TypeError: Cannot read properties of null (reading 'baseTexture')

It seems to be caused by the instanceof check failing for Texture and BaseTexture objects specifically when trying to create a new spritesheet. Is this caused by using the pixi-compressed-texture plugin? It looks like it hasn't been updated in some time. Is it no longer supported in later versions? Or is this perhaps a bug?

I also see there is a newer compressed-texture plugin https://www.npmjs.com/package/@pixi/compressed-textures? Is this now more integrated with pixi? Should I be looking to switch to this? And if so does it support ASTC?

I have also tried upgrading to [email protected] instead of legacy and it caused the same issue.

Any guidance on the correct upgrade path would be very welcome. Thanks.

Screenshot from 2022-04-12 16-37-46.png

Screenshot from 2022-04-12 16-41-52.png

Link to comment
Share on other sites

Actually I figured this out. This was some kind of typings dependency hell issue. I uninstalled all the pixi packages using npm (including pixi.js-legacy, pixi-filters, pixi-viewport, pixi-compressed-textures) then reinstalled the updated version of [email protected] and then the same versions of the other packages. I'm guessing my package-lock file must have gotten messed up over time but it looks like a fresh uninstall and reinstall did the trick.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...