srcnuzn Posted February 14, 2021 Share Posted February 14, 2021 Hello! I want to try out some additional filters, e. g. the bloom filter. I followed the instructions on npm - @pixi/filter-bloom. But when i add the import statement into my main.ts, i get the following error: "Cannot find module '@pixi/filter-bloom'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?" This is a snippet from my main.ts: The module appears under my node_modules directory and comes with a types.d.ts: The module is listed in my package.json file: Any idea how to solve this error? Best regards, srcnuzn Quote Link to comment Share on other sites More sharing options...
srcnuzn Posted February 14, 2021 Author Share Posted February 14, 2021 I solved it!! For anyone, running into the same problem: You need to add the module to the types field in your tsconfig.json file: In VSCode, i also get the type information now. Since im new to typescript and web-dev, maybe someone could tell me if this approach is correct? Also, maybe someone can explain what's happening in the background. Thanks anyways -srcnuzn 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.