Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
katowulf opened this issue Jan 6, 2018 · 7 comments

Comments

@katowulf
Copy link
Contributor

katowulf commented Jan 6, 2018

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/[email protected]
├─┬ @angular/[email protected]
│ ├─┬ @angular-devkit/[email protected]
│ │ ├─┬ @angular-devkit/[email protected]
│ ├─┬ @schematics/[email protected]
│ │ └─┬ @angular-devkit/[email protected]
├─┬ @angular/[email protected]
├─┬ @angular/[email protected]
│ ├─┬ @angular/[email protected]
├─┬ @angular/[email protected]
├─┬ @angular/[email protected]
├── @angular/[email protected]
├─┬ @angular/[email protected]
├── [email protected]

Sputnik:test-af2 katowulf$ npm list | grep fire
├── [email protected]
├─┬ [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ ├── @firebase/[email protected] deduped
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ ├── @firebase/[email protected]
[email protected]@schematics/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ └── @firebase/[email protected] deduped
│ ├─┬ @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └── @firebase/[email protected]

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.

@katowulf
Copy link
Contributor Author

katowulf commented Jan 6, 2018

Reverting to RC3 resolves the "mismatch" error
Forcing Firebase 4.8.0 resolves "Cannot find namespace 'firebase'." as described in #1387

@davideast
Copy link
Collaborator

Should be fixed with the current next release. npm i angularfire2@next.

@gauravweni
Copy link

gauravweni commented 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

@BobaFett58
Copy link

@gauravweni try to
' npm install [email protected] --save '

@davideast
Copy link
Collaborator

Fixed in the latest release.

@syncreticudon
Copy link

I think this error is back. Getting it on brand new project:
"angularfire2": "^5.0.0-rc.10",
"firebase": "^5.0.4",

@Vivek-abstract
Copy link

I'm getting this error in the 5.1.1 release. I have no idea how to fix it. I tried downgrading to 5.0.0.rc3 and rc4 but it didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants