We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Angular 8 + grid is broken for es2015 bundles using the newest version of the grid "@syncfusion/ej2-angular-grids": "^17.1.50",

Attached is a simple(and updated) example from your site that uses the async pipe similar to what I am doing in my environment, that will result in the error below

You will need to download and unpack the attachment and then run an npm install

it works if you run "ng serve"

it breaks if you run "ng serve --prod" and open in chrome





Attachment: syncfusion_931894d0_37aa8ac7.zip

18 Replies

PS Pavithra Subramaniyam Syncfusion Team June 7, 2019 12:09 PM UTC

Hi Moses, 

Greeting from Syncfusion. 

We have validated the provided sample and checked with our end. In your application, you are using ES2015 as target and there is a problem in tree shaking(bundling) with angular already. We have already raised a query related to that. Once they fixed the problem (version)we will check and ensure this at our end. 


Note: Sample works,  when you specified the target as ES5 instead ES2015 in ts.config.json 

Regards, 
Pavithra S. 





MF Moses Fetters June 7, 2019 12:54 PM UTC

They have fixed that issue, and I have tried it using the agular-cli version 8.0.2 and still get errors, it did however fix the size regression.

I understand that it works with ES5 as a target, but I have noticed huge improvements in TTI when targeting ES2015 is modern browsers so I would prefer to use that


JL Jose Luis Garcia June 9, 2019 08:56 AM UTC

Hi, more problems with Grid and Angular 8.

In latest version (17.1.50), after upgrade project to Angular 8, pager is broken (image attached).
No erros in console are displayed.

Regards
Jose

Attachment: Captura_ca7ab0c4.zip


PS Pavithra Subramaniyam Syncfusion Team June 11, 2019 11:25 AM UTC

Hi Moses, 

We have checked with latest angular package but yet it does not fixed the problem. We have checked regarding this issue with angular team. They have logged this as a bug. Please find GitHub link for your reference. 


Regards, 
Pavithra S. 



PS Pavithra Subramaniyam Syncfusion Team June 11, 2019 11:26 AM UTC

Hi Jose, 

We have validated the provided information and checked with our end. We suspect that in your application, you are not referring the dependent component(dropdown) styles. Please check and ensure whether you are referring dependent component styles in your sample. 

[styles.scss] 
@import '../node_modules/@syncfusion/ej2-base/styles/bootstrap.css' 
@import '../node_modules/@syncfusion/ej2-buttons/styles/bootstrap.css' 
@import '../node_modules/@syncfusion/ej2-calendars/styles/bootstrap.css' 
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/bootstrap.css';   
@import '../node_modules/@syncfusion/ej2-inputs/styles/bootstrap.css' 
@import '../node_modules/@syncfusion/ej2-navigations/styles/bootstrap.css'; 
@import '../node_modules/@syncfusion/ej2-popups/styles/bootstrap.css'; 
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/bootstrap.css' 
@import '../node_modules/@syncfusion/ej2-angular-grids/styles/bootstrap.css'; 
 

If you are still facing the problem then share the code example and how did you refer the styles in your application this might helpful for us to validate further. 

Regards, 
Pavithra S. 



AD adrian June 30, 2019 05:02 AM UTC

Hello,

I'm trying to use the Grid component (with pagging, grouping, excel export, etc).
Everything works fine if I use 'ng serve' but when I use 'ng build --prod' I get a line instead of the grid plus the error:
"TypeError: class constructors must be invoked with |new|"


Tried changing from es2018 to es5 as suggested at the beginning of this thread but then the code won't compile.

Regards 

Attachment: projects_909c550e.zip


PS Pavithra Subramaniyam Syncfusion Team July 2, 2019 11:57 AM UTC

Hi Adrian,  

Thanks for contacting Syncfusion support. 
 
We have validated the provided information and checked with target version es5 and it complied successfully without any failure so please share more details related to the compilation error that will helpful for us to validate further at our end.  
 
 
 
Note: While run the sample it cause allocation failure (Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory). 
 
For the constructor(es2015) issue, we have already raised query(class constructor must be invoked) to angular team. They have logged this as a bug. Please find GitHub link for your reference.  

 
Regards, 
Pavithra S. 



MF Moses Fetters July 18, 2019 01:11 AM UTC

Any update on this issue?


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team July 18, 2019 10:47 AM UTC

Hi Moses,  

In our previous update, we have requested the Adrian to provide details on the reported issue to replicate the issue at our end. So far, we didn’t get any reply from them. If you are reporting the same problem to us, please share the complete details releated to the issue.  

  1. Error details or log
  2. Package.json file

Regards,  
Seeni Sakthi Kumar S. 



MF Moses Fetters July 18, 2019 10:58 AM UTC

I want to know when you will support es 2015, this is the only library in our project that has issues with es2015 and thus holds us back from being able to target es2015 instead of es5


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team July 19, 2019 12:54 PM UTC

Hi Moses,  
 
We already reported issue to angular team, once angular team will fix the issue, we will ensure our side.  
 
Regards,  
Seeni Sakthi Kumar S. 



MA Marco August 5, 2019 02:10 PM UTC

I'm also facing similar issues, so I subscribed to this post. If you could update it once you guys have updates from Angular team, I appreciate.

Best regards,
Marco.


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team August 6, 2019 09:20 AM UTC

Hi Marco,  

Thanks for your update.  

We will let you know the once we get update from the Angular Team.  

Regards,  
Seeni Sakthi Kumar S. 



PK Paul Kocher August 17, 2019 03:15 PM UTC

It seems like the issue has been fixed. Even who opened the issue said it got fixed.

I'm still getting this error (Class constructor Component cannot be invoked without 'new') when using es2015 as target.

Only happens when trying to use the PageService though 😶


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team August 19, 2019 12:38 PM UTC

Hi Paul,  

We are unable to reproduce the problem at our end. We have prepared a sample with the target as es2015 and in the production mode, it is working fine. Refer to the demo.  


Regards,  
Seeni Sakthi Kumar S. 



PK Paul Kocher August 20, 2019 10:43 AM UTC

Hi Seeni Sakthi Kumar,

try setting "aot" to true in angular.json. This is what causes the problem :|


TO Tomas August 22, 2019 10:49 AM UTC

Hi Seeni Sakthi Kumar

If you run sample project with "ng serve --prod" you'll get following error.




SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team August 23, 2019 12:57 PM UTC

Hi Customer,  

We confirmed the reported issue is a defect and logged the defect report for this issue. We have planned to include the fix for this issue in upcoming patch release (28th august 2019 ). We will update you once the release rolled out and appreciate your patience until then.  

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.   


Regards, 
Seeni Sakthi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon