Typescript warning on package update


I am using vite and have done all the configuration provided at GoJS Typings in JavaScript or TypeScript

I updated gojs from 2.3.11 to 2.3.15

Typescript triggers the following warning

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

I also tried to add npm i --save @types/go without success

Which versions of Node.js, npm, and tsc are you using?

node 16.14.0
typescript 5.4.2
npm 8.3.1

If you modify the node_modules/gojs/package.json file so that its “exports” is:

  "exports": {
    "import": {
      "types": "./release/go-module.d.ts",
      "development": "./release/go-debug.mjs",
      "production": "./release/go.mjs",
      "default": "./release/go.mjs"
    "require": {
      "types": "./release/go.d.ts",
      "development": "./release/go-debug.js",
      "production": "./release/go.js",
      "default": "./release/go.js"

does your compilation work?

yes it is thank you

Thanks for confirming. This will be in the 2.3.16 release, which should be in the next couple days.

1 Like

Hello, please try 2.3.16 and let us know if it fixes your issue.

Seems to work on my side
Thank you again