aviabird / pinterest

PinWork(Pinterest for bloggers) built with ❤️ using Angular2 (4.0.0)
https://ng2-pinwork.firebaseapp.com
MIT License
200 stars 90 forks source link

Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation. #14

Open ghost opened 7 years ago

ghost commented 7 years ago

i got this issue at first time - ng serve : ERROR in Error encountered resolving symbol values statically. Calling function 'OpaqueToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol FirebaseUserConfig in /opt/ang_web/pin/pinterest/node_modules/angularfire2/tokens.d.ts, resolving symbol AngularFireModule.initializeApp in /opt/ang_web/pin/pinterest/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in /opt/ang_web/pin/pinterest/src/app/app.module.ts, resolving symbol AppModule in /opt/ang_web/pin/pinterest/src/app/app.module.ts

i give test space and save package.json file : i got this issue in browser console : Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation.

how to resolve this issue ? am new for angular4 so could you please give some solution for this issue

pkrawat1 commented 7 years ago

@aarustar This issue is specific to angularfire2. At the time i made this, the version of angularfire had some issues with angular 4. So to fix that i removed node_modules and reinstalled npm packages. But I thin you can also try changing the angularfire version to latest, and then try.

ghost commented 7 years ago

ERROR in /opt/ang_web/pin/pinterest/src/app/app.component.ts (2,10): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AngularFire'.

ERROR in /opt/ang_web/pin/pinterest/src/app/app.component.ts (2,23): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AuthProviders'.

ERROR in /opt/ang_web/pin/pinterest/src/app/services/authentication.ts (2,10): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AngularFire'. please help me to find out the issue.

ERROR in /opt/ang_web/pin/pinterest/src/app/services/authentication.ts (2,23): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AuthProviders'.

ERROR in /opt/ang_web/pin/pinterest/src/app/services/authentication.ts (2,38): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AngularFireDatabase'.

ERROR in /opt/ang_web/pin/pinterest/src/app/services/pin-data.ts (2,10): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AngularFireDatabase'.

ERROR in /opt/ang_web/pin/pinterest/src/app/app.module.ts (5,29): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AuthProviders'.

ERROR in /opt/ang_web/pin/pinterest/src/app/app.module.ts (5,44): Module '"/opt/ang_web/pin/pinterest/node_modules/angularfire2/index"' has no exported member 'AuthMethods'.

ERROR in /opt/ang_web/pin/pinterest/src/app/app.module.ts (89,53): Argument of type '{ provider: any; method: any; }' is not assignable to parameter of type 'string'.

i got this error after change the version and i have used this version "angularfire2": "4.0.0-rc.1",