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
Failed to construct 'HTMLElement' after updating to 4.0.1 #17411
Comments
There is this issue in an angular repo with an error similar to yours: Seems that changing the How is your From what I see in the ionic repo, it uses https://github.com/ionic-team/ionic/blob/v4.0.1/angular/tsconfig.json |
changing target to es2015 didn´t help. I had to install |
Faced the same problem today while updating a project I didn't updated since 4 weeks and I had no other choice neither to solve it than by adding the webcomponentsjs polyfill |
Same here. I updated my app deps and had to add the webcomponents polyfill too to make my app working again |
This fix works well in new devices, but old devices - where many lines in |
Thanks for the issue! Is this still an issue using latest? |
@brandyscarney latest as in Yea, I am having this issue!
|
I believe this problem is related with this issue: https://codepen.io/evertonrobertoauler/pen/zgKNbJ Please don't break the web and other libraries by replacing native code on the global scope, I believe it's better to create your own HTMLElement in an isolate scope. |
I also had this issue. I solved it by adding webcomponents as @weini01 described. As of this writing I am using these packages:
|
This is more than likely due to angular/webpack tooling incorrectly transforming how HTMLElement should be extended when transpiled to es5. But as @weini01 pointed out this is fixed by adding the correct polyfill. |
I disagree that this issue is ‘fixed’ The next poor sap has to find this github issue in order to resolve the issue. The issue should be reopened until it doesn’t happen out of the box. |
+1 for re-opening.. issues not fixed at all |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[x] 4.0.1
Current behavior:
When loading the app in the browser the following error occurs. I just updated my app to ionic/core@4.0.1 and also updated to the newest angular is this an angular problem or ionic?
TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Steps to reproduce:
Update to ionic/core@4.0.1 and angular@7.2.4
this are my dependencies
The text was updated successfully, but these errors were encountered: