Angular2-jwt: Metadata version mismatch (1.2 vs angular 4.4.7)

Created on 10 May 2018  ·  9Comments  ·  Source: auth0/angular2-jwt

I have angular 4.4.7
and can't compile version 1.2 (1.1 it's ok)
ERROR in Error: Metadata version mismatch for module ..../node_modules/@auth0/angular-jwt/index.d.ts, found version 4, expected 3, resolving symbol AppModule ...

any help?

stale

Most helpful comment

Downgrade to v1.1?

All 9 comments

I'm getting the same error and cannot compile. Here is the trace:

ERROR in Error: Metadata version mismatch for module /home/dporter/sites/alexis/node_modules/@auth0/angular-jwt/index.d.ts, found version 4, expected 3, resolving symbol AppModule in /home/dporter/sites/alexis/src/app/app.module.ts, resolving symbol AppModule in /home/dporter/sites/alexis/src/app/app.module.ts, resolving symbol AppModule in /home/dporter/sites/alexis/src/app/app.module.ts
at syntaxError (/home/dporter/sites/alexis/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at simplifyInContext (/home/dporter/sites/alexis/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
at StaticReflector.simplify (/home/dporter/sites/alexis/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
at StaticReflector.annotations (/home/dporter/sites/alexis/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
at _getNgModuleMetadata (/home/dporter/sites/alexis/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (/home/dporter/sites/alexis/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
at Object.listLazyRoutesOfModule (/home/dporter/sites/alexis/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/home/dporter/sites/alexis/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (/home/dporter/sites/alexis/node_modules/@ngtools/webpack/src/plugin.js:240:66)
at _donePromise.Promise.resolve.then.then.then.then.then (/home/dporter/sites/alexis/node_modules/@ngtools/webpack/src/plugin.js:493:24)
at
at process._tickCallback (internal/process/next_tick.js:160:7)

+1

I am using ionic when run

ionic cordova run android --prod

update to angular 5 fixed for me

Update angular 4.3 to angular 5 fixed for me too

Commands :

npm install @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@^5.0.0 [email protected] rxjs@^5.5.2

npm install [email protected] --save-exact

From : https://update.angular.io/

+1 I'm seeing the same issue, but unfortunately we have a large application and are not ready to upgrade past 4 at this time. Is there a workaround or is this library only compatible with 5+? If so, can the documentation be updated to signify this?

Downgrade to v1.1?

Thanks!. That worked.

Will this be resolved for 1.2, or will the 1.2 documentation be updated to indicate it is Angular 5+?

I dont know, maybe just wait the dev team fix this.

It's been awhile no new release so far, use v1.1 for angular 4 projects.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Eddman picture Eddman  ·  3Comments

UlyssesAlves picture UlyssesAlves  ·  5Comments

tekkudoc picture tekkudoc  ·  5Comments

sfabriece picture sfabriece  ·  4Comments

getglad picture getglad  ·  5Comments