Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Must call super constructor in derived class before accessing 'this'... when building in optimized Angular project #222

Open
andrewryan1906 opened this issue Feb 3, 2025 · 3 comments

Comments

@andrewryan1906
Copy link

I'm running Angular 13 and I am seeing a an error ONLY when building my Angular project with optimization set to true. The error:

ERROR ReferenceError: Must call super constructor in derived class before access 'this' or returning from derived constructor

Here are screenshots of the error and the Console Source.

If I disable optimization it goes away, but this negatively impacts my production application's performance.

Image Image
@simonsarris
Copy link
Collaborator

What version of GoJS are you using? Are you also using gojs-angular? What is your order number?

Is there a way to mark the go.js file for non-optimization in Angular's build process?

@andrewryan1906
Copy link
Author

andrewryan1906 commented Feb 3, 2025 via email

@simonsarris
Copy link
Collaborator

My primary concern is that Angular is taking minified GoJS code and re-minifying it, which is introducing a problem. There's nothing like "$" or '$' in our minified code, so my suspicion is Angular somehow added that.

Is there some way you can specify a list of libraries (they might have called it something like vendors), in Angular 13, that avoids the optimization step? It may not be an Angular specific option but a Webpack option (or whatever Angular 13 uses for bundling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants