Angular-google-maps: Metadata version mismatch for module With @agm/core

Created on 10 Jul 2018  路  11Comments  路  Source: SebastianM/angular-google-maps

I am getting version mismatch issue while creating build or "ng serve" after I installed @agm/core package for Google Autocomplete required at one page.

Error :
Metadata version mismatch for module /application/node_modules/@agm/core/index.d.ts, found version 4, expected 3, resolving symbol AppModule in /application/src/app/app.module.ts

Following commands were used to install -
$ npm install @agm/core --save $ npm install @types/googlemaps --save-dev

Installation was fine and it was working smoothly but I am not able to serve again or create build.

Here is my packages list :

"dependencies": {
"@agm/core": "^1.0.0-beta.3",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/braintree-web": "^3.6.3",
"@types/stripe": "^5.0.11",
"@types/waypoints": "^4.0.1",
"bootstrap3": "^3.3.5",
"braintree-web": "^3.34.0",
"core-js": "^2.4.1",
"counterup": "^1.0.2",
"countup.js-angular2": "^6.0.0",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"jquery-waypoints": "^2.0.5",
"ng2-cookies": "^1.0.12",
"ngx-bootstrap": "^2.0.4",
"ngx-braintree": "^1.9.1",
"ngx-progressbar": "^2.1.1",
"popper.js": "^1.14.3",
"rxjs": "^5.1.0",
"stripe": "^6.0.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "^1.7.4",
"@angular/compiler-cli": "^4.0.0",
"@types/google.analytics": "0.0.39",
"@types/googlemaps": "^3.30.11",
"@types/jasmine": "2.5.38",
"@types/jquery": "^3.3.2",
"@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.3.2",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}

stale

Most helpful comment

Changing :

From "@agm/core": "^1.0.0-beta.3" to "@agm/core": "^1.0.0-beta.2", working for me for Angular Version 4.0.0.

All 11 comments

Can you try with Angular 5?

Changing :

From "@agm/core": "^1.0.0-beta.3" to "@agm/core": "^1.0.0-beta.2", working for me for Angular Version 4.0.0.

@vivekdoshi2 Upgrading Angular should work too.

@lazarljubenovic ,

Yes but what if user wants the specific Angular version and don't want to upgrade it.

My answer is for specifically Angular 4.0.0 , but you are also right in your way.

So any sustainable solution for angular 4 version ?

Install an older version of the library?

This is because AGP module has a metadata file with version 4 (generated by Angular5) and your project uses metadata files with version 3. You have two options: or you find a AGP version which uses metadata files version 3 or you just upgrade your project to Angular5 so webpack can read metadata version 4 files

I am facing the same problem.
I can not upgrade the project to angular 5.x.
agm version 1.0.0-beta.2 is not working for several issues, but 1.0.0-beta.3 is working fine with angular 4.4.x but this mentioned error is preventing the production build.

someone please give a proper solution!

I have the same problem, My version is 4

Try without the caret:

from: "@agm/core": "^1.0.0-beta.3"
to: "@agm/core": "1.0.0-beta.3"

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nthonymiller picture nthonymiller  路  4Comments

marcelinobadin picture marcelinobadin  路  3Comments

n1t3w0lf picture n1t3w0lf  路  3Comments

PeterSisovsky picture PeterSisovsky  路  3Comments

vamsibassetty08 picture vamsibassetty08  路  3Comments