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

AgGrid 20.2.0 + Angular 8.0.0 + Ivy renderer fails for production builds #3159

Closed
rdunce opened this issue May 29, 2019 · 10 comments
Closed

Comments

@rdunce
Copy link

rdunce commented May 29, 2019

I'm submitting a ...

[x] bug report
[] feature request
[] support request

Current behavior
Using Ag Grid in Angular 8 with Ivy renderer turned on causes a production (--prod) build to fail. Dev builds are fine.

Time: 40713ms
chunk {0} runtime-es5.741402d1d47331ce975c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es5.4af9b61479361f268d39.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es5.827748167125a43ef247.js (polyfills) 68 kB [initial] [rendered]
chunk {3} styles.6d5b4213f05568ced35c.css (styles) 291 kB [initial] [rendered]

ERROR in There is no format with import statements in 'C:/[app root]/node_mod
ules/ag-grid-angular' entry-point.

Reproduce
Check out the ag-grid-angular-cli-example.
It will build fine until you add this to tsconfig.app.json

  "angularCompilerOptions": {
    "enableIvy": true
  },

It will fail with the same error as in our app.

Time: 28681ms
chunk {0} runtime-es5.741402d1d47331ce975c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es5.4af9b61479361f268d39.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es5.827748167125a43ef247.js (polyfills) 68 kB [initial][rendered]
chunk {3} styles.804a4c792796df7bf914.css (styles) 263 kB [initial] [rendered]

ERROR in There is no format with import statements in 'C:/[snip]/ag-grid-angular-cli-example-master/node_modules/ag-grid-angular' entry-point.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ag-grid-angular-cli-example@20.2.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ag-grid-angular-cli-example@20.2.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Please tell us about your environment:
Windows 10, Angular 8.0.0 + Ivy Renderer, Node 10.15.3, NPM 6.9.0

  • ag-Grid version: 20.2.0

  • Language: TypeScript 3.4.5

@rdunce rdunce changed the title Angular 8.0.0 + Ivy renderer fails for production builds AgGrid 20.2.0 + Angular 8.0.0 + Ivy renderer fails for production builds May 29, 2019
@qortex
Copy link

qortex commented May 29, 2019

I confirm, same error for me.

@qortex
Copy link

qortex commented May 29, 2019

Seems like it will get solved soon at compiler-cli level here : angular/angular#29564

@rdunce
Copy link
Author

rdunce commented May 30, 2019

Ahh, excellent news that it is being fixed upstream. Thanks @MicMicMon. I

@rdunce rdunce closed this as completed May 30, 2019
@qortex
Copy link

qortex commented May 30, 2019

I think the issue should stay open until the fix is confirmed, what do you think? That may still require some adjustment on the ag-grid side.

@jack1232
Copy link

jack1232 commented Jun 11, 2019

As discussed in angular/angular#29564, the author of AgGrid needs to re-package AgGrid using ng-packagr, in order to be compatible with Angular 8 Ivy.

@rdunce
Copy link
Author

rdunce commented Jun 12, 2019

The problem appears to be fixed upstream in angular/core next. Tested with ag-grid-angular-cli-example with angular next (ng update @angular/core --next) and it compiles.

The example throws an exception at runtime but that's a separate issue.

@rdunce rdunce closed this as completed Jun 12, 2019
@gtamas
Copy link

gtamas commented Jun 17, 2019

Well I have stable Angular 8 and it doesn't work with ag-grid-angular 20.1.0. I'm getting the error mentioned above.

I have Angular 8.0.1 and CLI 8.0.3.

Should I upgrade to ag-grid 21??

@Bogdan0205
Copy link

Well I have stable Angular 8 and it doesn't work with ag-grid-angular 20.1.0. I'm getting the error mentioned above.

I have Angular 8.0.1 and CLI 8.0.3.

Should I upgrade to ag-grid 21??

Still not fixed in 21.0.1

@fishgills
Copy link

We're an enterprise customer... could use this! It's the only thing preventing us from trying out Ivy in our product.

@seanlandsman
Copy link
Member

This is an issue on the Angular side - see this comment from the related Angular CLI issue: angular/angular#29564 (comment)

If you want to try Ivy with ag-Grid you'll need to reference @angular/compiler-cli@next

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

No branches or pull requests

8 participants