0

I have one of the most simplest modules, I am trying to make it independent, so that whenever I need it I can just import it very easily. Via NPM.

I try to do ng build --prof --aot to compile a complete separate module.

However I get this error:

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 Injectable in /work/src/app/material-import/node_modules/@angular/core/core.d.ts, ...

material-import.module.ts

import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { MdInputModule, MdButtonModule, MdRadioModule, MdCheckboxModule } from '@angular/material';

import 'hammerjs';

@NgModule({
  imports: [BrowserAnimationsModule, MdRadioModule, MdInputModule, MdButtonModule, MdCheckboxModule],
  exports: [BrowserAnimationsModule, MdRadioModule, MdInputModule, MdButtonModule, MdCheckboxModule],
  providers: []
})
export class MaterialImportModule { }

tsconfig.json

{
   "compilerOptions": {
      "target": "es5",
      "module": "es2015",
      "sourceMap": true,
      "moduleResolution": "node",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "declaration": true,
      "outDir": "./dist",
      "lib": ["es2015", "dom"]
   },
   "files": [
            "./index.ts"
          ]
}

index.ts

export * from './material-import.module';

Thank you in advance on any ideas :)

Rip3rs
  • 1,284
  • 12
  • 21

0 Answers0