nio_kasgami Posted July 15, 2020 Share Posted July 15, 2020 Hi, I am having issue to use pixi.js 5.3 using typescript. It will work fine using pure js but once I try to implement it in typescript, it will not work saving "Cannot find module" I digged through the code and for some reason the types are not here at all (it would normally ship with a d.ts) but for some reason it doesn't show. So I downloaded the repo file but each time I will try to run the Types npm script command it will throw an error and not work at all. here's the stack error file. Also yes I did npm install to make sure everything's was installed. I just runned the command 'types' (using VS code built-in task window) 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Users\\nioPC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'types:legacy' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pretypes:legacy', 'types:legacy', 'posttypes:legacy' ] 5 info lifecycle pixi.js-monorepo@~pretypes:legacy: pixi.js-monorepo@ 6 info lifecycle pixi.js-monorepo@~types:legacy: pixi.js-monorepo@ 7 verbose lifecycle pixi.js-monorepo@~types:legacy: unsafe-perm in lifecycle true 8 verbose lifecycle pixi.js-monorepo@~types:legacy: PATH: C:\Users\nioPC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\nioPC\PIXI_COmpile\pixi.js\node_modules\.bin;C:\Users\nioPC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\nioPC\PIXI_COmpile\pixi.js\node_modules\.bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Users\nioPC\AppData\Roaming\itch\apps\butler;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs\;C:\Users\nioPC\AppData\Local\Microsoft\WindowsApps;C:\Users\nioPC\AppData\Roaming\itch\apps\butler\butler.exe;C:\Users\nioPC\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\JetBrains Rider 2018.3.1\bin;C:\Users\nioPC\AppData\Local\atom\bin;C:\Users\nioPC\AppData\Local\GitHubDesktop\bin;C:\Users\nioPC\AppData\Local\Microsoft\WindowsApps;C:\Users\nioPC\AppData\Roaming\npm 9 verbose lifecycle pixi.js-monorepo@~types:legacy: CWD: C:\Users\nioPC\PIXI_COmpile\pixi.js 10 silly lifecycle pixi.js-monorepo@~types:legacy: Args: [ 10 silly lifecycle '/d /s /c', 10 silly lifecycle 'mkdirp dist/types && jsdoc -c types/jsdoc-legacy.conf.json && node types/assemble pixi.js-legacy' 10 silly lifecycle ] 11 silly lifecycle pixi.js-monorepo@~types:legacy: Returned: code: 1 signal: null 12 info lifecycle pixi.js-monorepo@~types:legacy: Failed to exec types:legacy script 13 verbose stack Error: pixi.js-monorepo@ types:legacy: `mkdirp dist/types && jsdoc -c types/jsdoc-legacy.conf.json && node types/assemble pixi.js-legacy` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Users\nioPC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Users\nioPC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1051:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid pixi.js-monorepo@ 15 verbose cwd C:\Users\nioPC\PIXI_COmpile\pixi.js 16 verbose Windows_NT 10.0.18362 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\nioPC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "types:legacy" 18 verbose node v14.4.0 19 verbose npm v6.14.5 20 error code ELIFECYCLE 21 error errno 1 22 error pixi.js-monorepo@ types:legacy: `mkdirp dist/types && jsdoc -c types/jsdoc-legacy.conf.json && node types/assemble pixi.js-legacy` 22 error Exit status 1 23 error Failed at the pixi.js-monorepo@ types:legacy script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] I would love to have a answer back to to this since it really slow me down on developing. all regards nio kasgami Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 Reported it to pixijs slack, someone will help you. I'm very bad with all those build problems. nio_kasgami 1 Quote Link to comment Share on other sites More sharing options...
nio_kasgami Posted July 15, 2020 Author Share Posted July 15, 2020 @ivan.popelyshev thank you a lots! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 So, as far as I understand: you prefer to use typings directly. No npm, no webpack and there are no typings in our github releases, somehow You tried to build pixi from repo and it failed, right? Quote Link to comment Share on other sites More sharing options...
nio_kasgami Posted July 15, 2020 Author Share Posted July 15, 2020 Yeah I don't use NPM since I build directly for the new RPG Maker (MZ) well prepping and I know they using the latest version of PIXI.js. and yes Building normally will work (it will Emit JS) although I can't emit any d.ts file. Quote Link to comment Share on other sites More sharing options...
bigtimebuddy Posted July 15, 2020 Share Posted July 15, 2020 You can get the types from an npm CDN (unpkg, jsdelivr, etc). For example: https://unpkg.com/[email protected]/pixi.js.d.ts https://cdn.jsdelivr.net/npm/[email protected]/pixi.js.d.ts nio_kasgami 1 Quote Link to comment Share on other sites More sharing options...
nio_kasgami Posted July 15, 2020 Author Share Posted July 15, 2020 Thanks @bigtimebuddy ! it does remove big annoyance on my back! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 Wait, MZ is using latest PIXI ? REALLY? OK, contacting MV guys, gonna ask if they need help Quote Link to comment Share on other sites More sharing options...
nio_kasgami Posted July 15, 2020 Author Share Posted July 15, 2020 (edited) 14 minutes ago, ivan.popelyshev said: Wait, MZ is using latest PIXI ? REALLY? OK, contacting MV guys, gonna ask if they need help of what they say! not sure exactly WHICH version they use but in their announcement thread they do say : latest node and latest Pixi.js https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mz-preview-3-character-generator-plugin-manager-event-plugin-command.123833/ here's the answer : Quote Rebuilt Core Engine, Editor, and Player And speaking of Plugins, let’s talk about CODE! RPG Maker MZ has reworked the code for almost every part of RPG Maker. From the Game Engine, the Player, to the Editor. Game Engine code entirely rewritten to follows current JS standards (ES6) PIXI has been updated to the latest version. Game Player Framework, Chromium, and nodejs have been updated to latest versions. Editor has been rewritten for the latest QTEngine for modern hardware. Edited July 15, 2020 by nio_kasgami Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 OK, anyway, i'll help support team when its out RM author is a very good coder, his previous work affected pixi, a lot. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 What can you do: take empty project (npm init) install pixi (npm install pixi.js-legacy), look in node_modules/pixi.js-legacy) , take typings into your project. nio_kasgami 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.