sureshchahal / angular2-adal

Angular 2 wrapper for adal.js
MIT License
41 stars 50 forks source link

AdalModule is not an NgModule #31

Open corfor opened 7 years ago

corfor commented 7 years ago

Using latest version of @angular/cli and typescript, unable to build my project because

ERROR in AdalModule is not an NgModule
webpack: Failed to compile.

It seems this module needs to be compiled differently, but I'm not clear on the specifics. One thing I've read is that tsconfig.json should target module es2015 instead of systemjs

"compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "moduleResolution": "node",
     . . .
}

See angular-cli#4447

harry671003 commented 7 years ago

I've faced a similar issue when using my package 'https://www.npmjs.com/package/ng2-appinsights'. This issue occurs in angular version 2.4.0.

The latest version of angular expects the the modules to be compiled using 'ngc' instead of 'tsc'

BennyM commented 7 years ago

Setting it up as provider works around the issue for now.

image