Skip to content

Cannot find definition file for './matter' #9

@WastedFreeTime

Description

@WastedFreeTime

Hello,
i tried using the phaser-matter-collision-plugin with Typescript and Angular but got the following error:

Error: node_modules/phaser-matter-collision-plugin/dist/collision-types.d.ts:1:23 - error TS2688: Cannot find type definition file for './matter'.

1 /// <reference types="./matter" />

My current project versions are:

"typescript": "~4.7.2"
"phaser": "^3.55.2",
"phaser-matter-collision-plugin": "^1.0.0",

Thats how i imported the plugin:

import PhaserMatterCollisionPlugin from 'phaser-matter-collision-plugin';

Three files throw this error:
valid-collision-object.d.ts, utils.d.ts and collision-types.d.ts

Is there something that i am missing? I looked at the Phaser module itself and there its .matter reference is just working fine.

Can someone help me?
Thanks for any help and ideas!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions