SenPie Posted July 21, 2021 Share Posted July 21, 2021 Hi, I want to use pixi-viewport library in my project, however I get this TypeScript errors when I try to integrate it in my project [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(2,13): Error TS1005: '=' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 2, column: 13 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(2,36): Error TS1005: ';' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 2, column: 36 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(3,13): Error TS1005: '=' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 3, column: 13 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(3,38): Error TS1005: ';' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 3, column: 38 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(4,13): Error TS1005: '=' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 4, column: 13 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(4,31): Error TS1005: ';' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 4, column: 31 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(5,13): Error TS1005: '=' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 5, column: 13 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(5,39): Error TS1005: ';' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 5, column: 39 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(6,13): Error TS1005: '=' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 6, column: 13 } [15:57:08] [TypeScript error: node_modules/pixi-viewport/index.d.ts(6,41): Error TS1005: ';' expected.] { fileName: 'node_modules/pixi-viewport/index.d.ts', line: 6, column: 41 I believe the issue is with me using old version of pixi.js, which is version [email protected], and [email protected]. Anyone knows which version of pixi-viewport I should use, that is compatible with old pixi? Or maybe someone knows another way to solve this issue. However, in any case I cannot upgrade my pixi version. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 21, 2021 Share Posted July 21, 2021 Official policy is: everyone that uses v5 with typescript should upgrade to v6 because that's the main reason for upgrade - new typings with less problems. > Anyone knows which version of pixi-viewport I should use, that is compatible with old pixi? Usually you determine it by going through commits, because, honestly, documentation is usually misleading. Alternatively, you can just ask davidfig himself? https://github.com/davidfig/pixi-viewport/ Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 21, 2021 Author Share Posted July 21, 2021 Then returning to the previous post can you please help me to upgrade my project to pixi.js v6 ? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 21, 2021 Share Posted July 21, 2021 I dont see the problem. If you have custom typings - you can modify them Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 21, 2021 Author Share Posted July 21, 2021 14 minutes ago, ivan.popelyshev said: I dont see the problem. If you have custom typings - you can modify them I followed your advice from previous post and fixed the typings, however there are many more other issues when compiling the code. Here is the full log: https://pastebin.com/SPUcsLcU. Here is my tsconfig.json and packages in package.json file { "compilerOptions": { "target": "es6", "lib": ["es2015","dom"], "module": "commonjs", "typeRoots" : [ "./typings", "./node_modules/@types"], "noImplicitAny": false, "strictFunctionTypes": true, "alwaysStrict": true , "resolveJsonModule": true, "esModuleInterop": true }, "exclude": ["./templates"] } "dependencies": { "@pixi/utils": "^6.0.4", "@tweenjs/tween.js": "^17.3.0", "howler": "^2.1.1", "pixi-viewport": "^4.32.0", "pixi.js": "^6.0.4", "pixiv5-tiled": "^1.1.4" }, "devDependencies": { "@types/howler": "^2.1.0", "@types/tween.js": "^17.2.0", "browserify": "^16.2.3", "del": "^3.0.0", "gulp": "^4.0.0", "gulp-concat": "^2.6.1", "gulp-connect": "^5.7.0", "gulp-inline": "^0.1.3", "gulp-preprocess": "^3.0.2", "gulp-rename": "^1.4.0", "gulp-sourcemaps": "^2.6.4", "gulp-typescript": "^5.0.0", "gulp-uglify-es": "^1.0.4", "gulp-util": "^3.0.8", "tsify": "^4.0.1", "typescript": "^3.3.3", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0" } Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 21, 2021 Share Posted July 21, 2021 I dont know whether its related, but pixi uses typescript 3.9.5 Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 21, 2021 Author Share Posted July 21, 2021 I am using tsify to compile the typescript, and I have no idea how to specify the typescript version to be 3.9.5. Can you share your usual tsconfig.json file which you would use in pixi v6 projects? Quote Link to comment Share on other sites More sharing options...
SenPie Posted July 21, 2021 Author Share Posted July 21, 2021 Hey @ivan.popelyshev do you use telegram, discord or any other program that would make communication faster? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 21, 2021 Share Posted July 21, 2021 t.me/hackerham but i dont know if i can actually help with that thing, i hate build problems 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.