NorthwoodsSoftware / GoJS

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
http://gojs.net
Other
7.7k stars 2.86k forks source link

Gojs console issue #118

Closed alpeshkalena closed 3 years ago

alpeshkalena commented 3 years ago

image

Hi, I am using go.js with angular and i am getting error which is described in attached screenshot. project is successfully compiling but getting error in chrome browser's console. Can you please guide me or provide any solution or any solutions links for error solution?

Thanks in advance

simonsarris commented 3 years ago

Is your code trying to minify go.js further? That may be an issue.

Otherwise, if you can offer some code so that we can reproduce this, we can take a look.

alpeshkalena commented 3 years ago

Hi, we have remove optimization and minification process but still getting the same error. I am sending you error from js which is shown in below video link. https://jmp.sh/4QecSt9 -- This is video link so you can get actual idea what i am getting in console.

awulkan commented 3 years ago

Hey, we're also getting this problem when upgrading from version 2.1.25 to 2.1.30. It's a big Vue 2 application, so I don't think I can reproduce it easily. When inspecting the code, it seems like it transpiles into this:

var Ff, Hf = new pt, Yf = "object" === typeof g.document && g.document.currentScript ? g.document.currentScript.src : "", zf = Yf, Uf = ["Layout", "GoJSScriptURL"], Vf = this;
Uf[0]in Vf || !Vf.execScript || Vf.execScript("var " + Uf[0]);

Where I think Vf is undefined.

The temporary solution for me was to downgrade to 2.1.25.

simonsarris commented 3 years ago

Is it possible for either of you to make me a reproducible sample of what you're seeing?

WalterNorthwoods commented 3 years ago

@awulkan, that code is not in the go.js library.

Are you sure that you do not have any code that is using a minified name? GoJS defines no two letter property or method names except for InputEvent.up.

simonsarris commented 3 years ago

We have reproduced this issue and will have a fix soon.

awulkan commented 3 years ago

@WalterNorthwoods This is GoJS code that's gone through build process, just like for @alpeshkalena. So the names are minified. It only fails in production, after it has been built.

@simonsarris Great! Sorry for not creating a reproducible example in time.

simonsarris commented 3 years ago

Hello, please update to the just-released version 2.1.31, which should fix these issues.

Sorry for the trouble. Let me know if you encounter anything else.

awulkan commented 3 years ago

I can verify that the fix solved my problem at least. Thanks.