SenPie Posted July 20, 2021 Share Posted July 20, 2021 Hi, My project is using 5.1.1 version of Pixi.js, however I decided to upgrade it to version 6.0.4, which presumably is the latest one and is also the version that I am most comfortable with. Unfortunately, after upgrading the version I get many errors from TypeScript, which does not recognize most of the classes like PIXI.Spritesheet, PIXI.Texture and etc. It says namespcae "PIXI" has no exported member 'Texture'. Here is my tsconfig.json { "compilerOptions": { "target": "es6", "lib": ["es2015", "dom"], "module": "commonjs", "typeRoots": ["./typings", "./node_modules/@types"], "noImplicitAny": true, "strictFunctionTypes": true, "alwaysStrict": true, "resolveJsonModule": true, "esModuleInterop": true }, "exclude": ["./templates"] } Then as you can see I have a ./typings folder, there I have other sub-directories like this: Most of the errors are in typings>pixi-tiled>index.d.ts. Where I get this errrors However, in other files when I do import * as PIXI from 'pixi.js'; I can access all PIXI classes without any issue. Can you help fix this errors, because they were not happening in version 5.1.1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 20, 2021 Share Posted July 20, 2021 (edited) pixi-tiled was updated: https://github.com/eXponenta/pixi-tiled , so you dont actually need to separate its typings, just "import {stuff} from 'pixi-tiled';" should work Edited July 20, 2021 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 20, 2021 Author Share Posted July 20, 2021 Thanks will do that. However the the same issue is present in other places like this one Also, what without issue was compiling before now is giving this huge error list in terminal https://pastebin.ubuntu.com/p/NXpXMGrzym/ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 20, 2021 Share Posted July 20, 2021 6.1.0 will have new typings, with LoaderResource you can try ILoaderResource for now . As for dictionary - Dict<ILoaderResource> , where Dict is from pixi utils. SenPie 1 Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 20, 2021 Author Share Posted July 20, 2021 I think right now the best for me is to switch back, and after version 6.1.0 gets available I will again try to upgrade the pixi verison. Thanks ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.