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.

RC4 install produces "Error: Metadata version mismatch for module angularfire2/index.d.ts, found version 4 expected 3, resolving symbol AppModule"

See original GitHub issue

This looks similar to #1397. I can create a complete repro if needed, but I’ve literally followed the install guide to the letter.

Version info

Sputnik:test-af2 katowulf$ npm list | grep angular
β”œβ”€β”¬ @angular/animations@4.4.6
β”œβ”€β”¬ @angular/cli@1.4.9
β”‚ β”œβ”€β”¬ @angular-devkit/build-optimizer@0.0.36
β”‚ β”‚ β”œβ”€β”¬ @angular-devkit/core@0.0.22
β”‚ β”œβ”€β”¬ @schematics/angular@0.0.49
β”‚ β”‚ └─┬ @angular-devkit/core@0.0.20
β”œβ”€β”¬ @angular/compiler@4.4.6
β”œβ”€β”¬ @angular/compiler-cli@4.4.6
β”‚ β”œβ”€β”¬ @angular/tsc-wrapped@4.4.6
β”œβ”€β”¬ @angular/forms@4.4.6
β”œβ”€β”¬ @angular/http@4.4.6
β”œβ”€β”€ @angular/language-service@4.4.6
β”œβ”€β”¬ @angular/router@4.4.6
β”œβ”€β”€ angularfire2@5.0.0-rc.4

Sputnik:test-af2 katowulf$ npm list | grep fire
β”œβ”€β”€ angularfire2@5.0.0-rc.4
β”œβ”€β”¬ firebase@4.8.1
β”‚ β”œβ”€β”¬ @firebase/app@0.1.5
β”‚ β”‚ β”œβ”€β”€ @firebase/app-types@0.1.0
β”‚ β”‚ └── @firebase/util@0.1.5
β”‚ β”œβ”€β”¬ @firebase/auth@0.3.1
β”‚ β”‚ └── @firebase/auth-types@0.1.0
β”‚ β”œβ”€β”¬ @firebase/database@0.1.6
β”‚ β”‚ β”œβ”€β”€ @firebase/database-types@0.1.0
β”‚ β”‚ β”œβ”€β”€ @firebase/util@0.1.5 deduped
β”‚ β”œβ”€β”¬ @firebase/firestore@0.2.2
β”‚ β”‚ β”œβ”€β”€ @firebase/firestore-types@0.1.0
β”‚ β”‚ β”œβ”€β”€ @firebase/webchannel-wrapper@0.2.5
angularfire2@5.0.0-rc.4@schematics/angular@0.0.49
β”‚ β”œβ”€β”¬ @firebase/messaging@0.1.6
β”‚ β”‚ β”œβ”€β”€ @firebase/messaging-types@0.1.0
β”‚ β”‚ └── @firebase/util@0.1.5 deduped
β”‚ β”œβ”€β”¬ @firebase/polyfill@0.1.3
β”‚ β”œβ”€β”¬ @firebase/storage@0.1.5
β”‚ β”‚ └── @firebase/storage-types@0.1.0

How to reproduce these conditions

  1. Follow setup steps described in readme
  2. Run ng serve after installing AF2
  3. Fails with errors described below.

Debug output

** Errors in the JavaScript console **

This error appears upon running ng serve immediately after adding AngularFireModule.initializeApp(environment.firebase), into my app.module.ts and running ng serve

ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (5,45): Cannot find namespace 'firebase'.
ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (8,17): Cannot find namespace 'firebase'.
ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (9,21): Cannot find namespace 'firebase'.
ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (10,22): Cannot find namespace 'firebase'.
ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (11,20): Cannot find namespace 'firebase'.
ERROR in /Users/katowulf/projects/test-af2/node_modules/angularfire2/firebase.app.module.d.ts (13,22): Cannot find namespace 'firebase'.
ERROR in Error: Metadata version mismatch for module /Users/katowulf/projects/test-af2/node_modules/angularfire2/index.d.ts, found version 4, expected 3, resolving symbol AppModule in /Users/katowulf/projects/test-af2/src/app/app.module.ts, resolving symbol AppModule in /Users/katowulf/projects/test-af2/src/app/app.module.ts, resolving symbol AppModule in /Users/katowulf/projects/test-af2/src/app/app.module.ts
    at syntaxError (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at _getNgModuleMetadata (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/katowulf/projects/test-af2/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/Users/katowulf/projects/test-af2/node_modules/@ngtools/webpack/src/plugin.js:212:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (/Users/katowulf/projects/test-af2/node_modules/@ngtools/webpack/src/plugin.js:448:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

** Output from firebase.database().enableLogging(true); **

n/a

Expected behavior

Should compile and start server when following install directions exactly.

Actual behavior

Receive version mismatch in angularfire2/index.d.ts.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
BobaFett58commented, Jan 22, 2018

@gauravweni try to ’ npm install angularfire2@5.0.0-rc.3 --save ’

1reaction
gauravwenicommented, Jan 22, 2018

Metadata version mismatch for module E:/fhc-app-temp/node_modules/angularfire2/index.d.ts, found version 4, expected 3 getting this error plz help me

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Metadata version mismatch for module X found ...
ERROR in Metadata version mismatch for module ngx-clipboard/dist/index.d.ts, found version 4, expected 3, resolving symbol AppModule in ...
Read more >
Metadata version mismatch for module /mobile/node_modules ...
Hi I have this error when try to run a command: sudo ionic cordova ... .d.ts, found version 4, expected 3 Error: Metadata...
Read more >
Angular – ERROR in Metadata version mismatch for module X ...
ERROR in Metadata version mismatch for module ngx-clipboard/dist/index.d.ts, found version 4, expected 3, resolving symbol AppModule in .
Read more >
ERROR in No NgModule metadata found for 'AppModule'
[Solved]-ERROR in No NgModule metadata found for 'AppModule'-angular.js ... mismatch for module X found version 4, expected 3, resolving symbol Y Β· ERROR...
Read more >
Getting Out of Version-Mismatch-Hell with Module Federation
Webpack Module Federation makes it easy to load separately compiled code like micro frontends. It even allows us to share libraries amongΒ ...
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