If I am missing any pertinent information, please let me know.
I am trying to build out a web application that uses adal-angular4 for authentication with Azure AD. I am running into the below compilation error:
ERROR in Error: Metadata version mismatch for module C:/Users/elmerm/source/repos/TxDOT POC Base/node_modules/adal-angular4/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Users/elmerm/source/repos/TxDOT POC Base/src/app/app.module.ts, resolving symbol AppModule in C:/Users/elmerm/source/repos/TxDOT POC Base/src/app/app.module.ts at syntaxError (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler\bundles\compiler.umd.js:24979:23) at StaticReflector.simplify (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler\bundles\compiler.umd.js:24991:13) at StaticReflector.annotations (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler\bundles\compiler.umd.js:24418:41) at _getNgModuleMetadata (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler-cli\src\ngtools_impl.js:138:31) at _extractLazyRoutesFromStaticModule (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler-cli\src\ngtools_impl.js:109:26) at Object.listLazyRoutesOfModule (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler-cli\src\ngtools_impl.js:53:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@angular\compiler-cli\src\ngtools_api.js:91:39) at AotPlugin._getLazyRoutesFromNgtools (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@ngtools\webpack\src\plugin.js:240:66) at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\elmerm\source\repos\TxDOT POC Base\node_modules@ngtools\webpack\src\plugin.js:493:24) at process._tickCallback (internal/process/next_tick.js:68:7)
When reviewing the npm page for adal-angular4 (https://www.npmjs.com/package/adal-angular4) it states it is compatible with Angular versions 4+. Maybe I'm misunderstanding. I've tried using an older version of adal-angular4 (v 3.0.6) but I receive the exact same error as above.
Here is my package.json:
{
"name": "inspinia",
"version": "2.7.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.0.1",
"@angular/common": "^4.0.1",
"@angular/compiler": "^4.0.1",
"@angular/compiler-cli": "^4.0.1",
"@angular/core": "^4.0.1",
"@angular/forms": "^4.0.1",
"@angular/http": "^4.0.1",
"@angular/platform-browser": "^4.0.1",
"@angular/platform-browser-dynamic": "^4.0.1",
"@angular/platform-server": "^4.0.1",
"@angular/router": "^4.0.1",
"@types/googlemaps": "^3.38.1",
"adal-angular": "^1.0.17",
"adal-angular4": "^4.0.12",
"animate.css": "3.1.1",
"bootstrap": "^3.3.7",
"chart.js": "^2.9.3",
"core-js": "^2.6.11",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"jquery-slimscroll": "^1.3.8",
"jquery-sparkline": "^2.4.0",
"jvectormap": "1.2.2",
"metismenu": "^2.5.0",
"ng2-charts": "^1.6.0",
"ngx-bootstrap": "^1.6.6",
"ngx-datetime-picker": "^2.3.0",
"ngx-select-dropdown": "^1.2.1",
"peity": "^3.2.1",
"rxjs": "^5.1.0",
"xml-js": "^1.6.11",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "^1.0.0",
"@angular/compiler-cli": "^2.4.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "^3.0.2",
"tslint": "~4.5.0",
"typescript": "^2.9.2"
}
}
Is this simply a compatibility issue and the current version of adal-angular4 is in fact not compatible with angular 4? Or am I missing simple update?