threejs-math icon indicating copy to clipboard operation
threejs-math copied to clipboard

newer typescript version don't find typings

Open YPetremann opened this issue 7 months ago • 0 comments

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

Causes:

Newer typescript want a exports["."].types

Solution: in package json

{
  ...
  "typings": "types/index.d.ts",
  "exports": {
    ".": {
      "import": "./build/threejs-math.module.js",
      "require": "./build/threejs-math.cjs",
      "types": "./types/index.d.ts"
    }
  },
  ...
}

solved by #2

YPetremann avatar Jun 14 '25 19:06 YPetremann