Datatables for Angular 2 Error ɵmakeDecorator

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 /frontend/gremio/node_modules/angular-datatables/node_modules/@angular/core/core.d.ts, resolving symbol DataTablesModule in /frontend/gremio/node_modules/angular-datatables/src/angular-datatables.module.d.ts, resolving symbol DataTablesModule in /frontend/gremio/node_modules/angular-datatables/src/angular-datatables.module.d.ts

I honestly don’t know why it does not work… With @angular/cli version 1.0.0, it works as expected, and just with one path, it won’t work…
So you can:

  • either revert back to version 1.0.0 of angular-cli
  • either declare the DataTableModule by using forRoot():

import { NgModule } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;

import { DataTablesModule } from ‘angular-datatables’;

import { AppComponent } from ‘./app.component’;

declarations: [
imports: [

providers: [],
bootstrap: [ AppComponent ]
export class AppModule {}