daniel-brenot / ngx-mui-datatables

Datatables for Angular using Material-UI - Original project: https://github.com/gregnb/mui-datatables
MIT License
4 stars 2 forks source link

Any idea for compilation error? #2

Open GeekyRyan opened 5 years ago

GeekyRyan commented 5 years ago

Hey I was trying to integrate this library in my Angular project, but got the following error:

Unexpected value 'NgxMuiDatatablesModule in /Users/.../node_modules/ngx-mui-datatables/ngx-mui-datatables.d.ts' imported by the module 'AppModule in /Users/.../src/app/app.module.ts'. Please add a @NgModule annotation.

The module was imported in app.module.ts, and the package was installed via npm. I'm using Angular 8.2.1

GeekyRyan commented 5 years ago

Seems like it was caused by using --aot ahead-of-time compiler when starting the application, got it fixed by using the default option --jit. But why?

daniel-brenot commented 4 years ago

Most likely because at this time the library is a wrapper for the react library. I will be making this a native angular library soon so this issue will go away in the next major release.