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

ERROR in DataTableModule is not an NgModule #91

Closed
nandhuems opened this issue Mar 22, 2017 · 8 comments
Closed

ERROR in DataTableModule is not an NgModule #91

nandhuems opened this issue Mar 22, 2017 · 8 comments

Comments

@nandhuems
Copy link

First Compile its loading with error, anything change inside the code again its re-compile working fine. what is a problem?

@mashhoodr
Copy link

Getting the following error with Angular 4.0

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in ../node_modules/angular2-datatable/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in ../node_modules/angular2-datatable/node_modules/@angular/core/src/metadata.d.ts, resolving symbol NgModule in ../node_modules/angular2-datatable/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in ../node_modules/angular2-datatable/node_modules/@angular/core/index.d.ts, resolving symbol DataTableModule in ../node_modules/angular2-datatable/lib/DataTableModule.d.ts, resolving symbol DataTableModule in ../node_modules/angular2-datatable/lib/DataTableModule.d.ts

@trevex
Copy link
Contributor

trevex commented Mar 24, 2017

angular2-datatable is not AoT compatible at the moment, see point 8 here: https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5#.wmaqchqya

You can apply the changes locally to successfully compile:
Simply change angular2-datatables @angular/* dependencies to peer-dependencies and delete the @angular folder within node_modules/angular2-datatable/node_modules.

@trevex
Copy link
Contributor

trevex commented Mar 24, 2017

I submitted a PR #93, but for people like me who need an instant fix to continue with the migration to ng 4.0. You could temporarily use my fork from github directly by changing your package.json as following:
"angular2-datatable": "github:trevex/angular2-datatable#build",

NOTE: I will delete the fork once the changes hit master and are published to npm!

@htrex
Copy link

htrex commented Mar 25, 2017

I'm seeing this problem upgrading from Angular 2.4.10 to 4.0.0.
@travex build works, please merge PR #93 and publish to npm, thanks.

@nandhuems
Copy link
Author

Hi thanks Everyone. i resolved the error. just upgrade my angularcli. now working fine

@mariuszfoltak
Copy link
Owner

Solved in v0.6.0, many thanks to @trevex

@stirumala76
Copy link

v0.6.0 I am not seeing this version, issue did not resolve

@okpablo
Copy link

okpablo commented Jan 10, 2018

Just replace in app.module.ts:
import { DataTableModule } from 'angular-4-data-table';
with
import { DataTableModule } from 'angular-4-data-table/src/index';

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

7 participants