Sign in to follow this  

Can't find module pixi.js in typescript 5.3 and typescript

Recommended Posts


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 npm@6.14.5
3 info using node@v14.4.0
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

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites
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 

here's the answer



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 by nio_kasgami

Share this post

Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.