after upgrading from 2.X to 3.X, we downloaded the new extensions, put them in the same location they where (extensionJSM and extensionTS folders).
but now during build we get the error :
“Module not found: Error: package path … is not exported from package”
Are you using JavaScript/EcmaScript modules? Those are in the extensionsJSM folder. In version 3.0 we deleted the extensionsTS folder, which held UMD-style modules.
It is still supported, but the kit now includes just two module compilation targets (for script tags and for ES module imports) instead of three (no longer for require). If you want it for require, compile the TS file to a UMD module. Here is the (original v2.3) tsconfig.json:
I don’t quite understand:
we are using it in Angular - that is only in ts files, and we use import not require.
in our tsconfig compiler options we are using
“target”: “ES2022”
strict: true
module: ES2022
I’ve put all the plugins in ExtensionsJSM just in case and call them from there
changing the directory did not help with the error
If you have copied the .ts file(s) that you are using into your project, then you are treating it like your own code. This is what we have always recommended. Don’t refer to it in our extensions… directory.
That’s very odd. That method is clearly defined: GraphLinksModel | GoJS API and present in the latest go-debug.js and go.js files. As is the internal interface method isGroupForData. I cannot explain how in your situation the value of this model (i.e. the Diagram.model’s value of this) could be wrong.
Up until now, we were using GOJS 2.3 for 3-4 years.
I tried to run a second application in our project that is using GOJS and it crashed for the same reason.
At least i was able to track the crash point in our code :
Do you call Model.toJson and Model.fromJson, or other related methods involved with the serialization of models? If your code doesn’t, how is serialization implemented, and can you test that on its own?
Why do you have references to Diagram or GraphObject related objects in your model data? I’m referring to the values of mouseDragEnter and mouseDragLeave, which I would guess are closures. In fact having functions as values in data objects is problematic by itself.