I get a weird error: "Error: Unknown type of binding target: Node#241"

I’m refactoring part of my code and I get this error and I don’t even know where to start looking on what’s causing it. The data being sent to the diagram is the same

Error: Unknown type of binding target: Node#241

That’s a weird error to get. Could you please confirm that you are loading the GoJS library only once? In other words, that your app is not loading the same library more than once, that it isn’t loading different versions of the library, and that it isn’t loading both the go.js library and the go-debug.js library?

Hi @walter,

That was it. I had a package that was loading gojs. I ended up using their gojs, which is better.

Thank you!

I’m glad that fixes it. For version 2.1.25 the library will detect whenever it is loaded again and it will throw an Error.

Loading the library twice can cause a lot of subtle problems. And trying to run different versions of the library in the same page isn’t guaranteed to work – imagine a Diagram created with one version and another Diagram created with a different version and then trying to perform a drag-and-drop between them.