angular2-jwt icon indicating copy to clipboard operation
angular2-jwt copied to clipboard

Metadata version mismatch (1.2 vs angular 4.4.7)

Open pavelriha opened this issue 8 years ago • 9 comments

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?

pavelriha avatar May 10 '18 08:05 pavelriha

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)

s001dxp avatar May 12 '18 19:05 s001dxp

+1

I am using ionic when run

ionic cordova run android --prod

msyahidin avatar May 15 '18 08:05 msyahidin

update to angular 5 fixed for me

msyahidin avatar May 16 '18 05:05 msyahidin

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/

seblemeur avatar May 16 '18 11:05 seblemeur

+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?

mwootendev avatar Jun 14 '18 15:06 mwootendev

Downgrade to v1.1?

msyahidin avatar Jun 14 '18 15:06 msyahidin

Thanks!. That worked.

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

mwootendev avatar Jun 15 '18 03:06 mwootendev

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.

msyahidin avatar Jun 15 '18 05:06 msyahidin

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! 🙇‍♂️

stale[bot] avatar Oct 26 '19 03:10 stale[bot]