NateTheGreatt / bitECS

Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
Mozilla Public License 2.0
902 stars 83 forks source link

Could not find declaration file for module 'bitecs' #116

Closed Jelleebeen closed 1 year ago

Jelleebeen commented 1 year ago

Hi,

I'm seeing the following error when using bitecs (v0.3.38) with Vite:

Could not find a declaration file for module 'bitecs'. ... /node_modules/bitecs/dist/index.mjs' implicitly has an 'any' type. There are types at ... /node_modules/bitecs/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'bitecs' library may need to update its package.json or typings.

According to this discussion, the suggestion from Typescript is to rename the index.d.ts file to index.d.mts, and when I do this locally, it resolves this issue.

Jelleebeen commented 1 year ago

Thanks, this resolves the issue.