question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR in Error: Metadata version mismatch for module

See original GitHub issue

Getting this error: ERROR in Error: Metadata version mismatch for module node_modules/angularx-qrcode/dist/index.d.ts, found version 4, expected 3, resolving symbol OrderHistoryModule in history.module.ts, resolving symbol OrderHistoryModule in history.module.ts My angular CLI version is 1.7.4 and my package.json:

{ "name": "n", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^4.2.4", "@angular/cdk": "2.0.0-beta.12", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/material": "2.0.0-beta.12", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "@ng-bootstrap/ng-bootstrap": "^1.0.0", "@ngrx/effects": "^4.0.5", "@ngrx/store": "^4.0.3", "@types/date-fns": "^2.6.0", "angular-calendar": "^0.11.0", "angular2-datatable": "^0.6.0", "angularx-qrcode": "^1.0.2", "core-js": "^2.4.1", "date-fns": "^1.29.0", "mydatepicker": "^2.6.1", "ng-recaptcha": "^3.0.3", "ng2-cookies": "^1.0.12", "ngx-barcode": "^0.2.4", "ngx-loading": "^1.0.9", "ngx-mydatepicker": "^2.4.2", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "1.4.1", "@angular/compiler-cli": "^4.2.4", "@angular/language-service": "^4.2.4", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.1.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~3.2.0", "tslint": "~5.3.2", "typescript": "^2.7.0-rc" } }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
carrieXincommented, Jul 19, 2018

maybe you should update “angularx-qrcode”: “^1.0.2” to “angularx-qrcode”: “1.0.1” in your package.json

1reaction
stephen-eascommented, Aug 22, 2021

same issue. 1.0.3 on angular 4.4.7 found version 4 expected version 3. Oddly it worked for about a minute. tried the modules clear and reinstall, but this seems to be stuck with that bug/warning

difference between working and not was editing a CSS file. reverted those changes to no effect, very weird.

Same setup as you, I was able to resolve and successfully build by changing from ^1.0.3 to 1.0.1 in the package.json file

After building and importing the module, you’ll need to ensure you’re using the correct attributes for the 1.x versions. From the docs below:

# Old code in 1.x
<qrcode [qrdata]="'Your data'" [size]="256" [level]="'M'" usesvg="true"></qrcode>

# New code in 2.x or 10.x
<qrcode [qrdata]="'Your data'" [width]="256" [errorCorrectionLevel]="'M'" [elementType]="'svg'"></qrcode>
Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Metadata version mismatch for module X found ...
It turns out the build error message indicates an Angular compatibility problem. The ngx-clipboard requires Angular 5+, but as can be seen from ......
Read more >
ERROR in Error: Metadata version mismatch for module ...
Hello everyone, i am trying to install this template in angular 4 but when write ng serve comand i get this error. i...
Read more >
Metadata version mismatch for module - Found vs Expected
Upgrading minor version of node modules for Angular are simple and straight forward. In rare cases you may encounter errors like ' Metadata...
Read more >
Metadata version mismatch for module /mobile/node_modules ...
Hi I have this error when try to run a command: sudo ionic cordova run android --prod --release. Error: ionic-app-script task: "build" ...
Read more >
5.0.0rc6 produces ERROR in Metadata version mismatch for ...
ERROR in Metadata version mismatch for module node_modules/angularfire2/index.d.ts, found version 4, expected 3, resolving symbol AppModule in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found