adriancarriger / angularfire2-offline

🔌 A simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.
https://angularfire2-offline.firebaseapp.com/
MIT License
207 stars 48 forks source link

ERROR #68

Closed esgantivar closed 7 years ago

esgantivar commented 7 years ago

When I try to add angularfire2-offline have "Cannot find module 'angularfire2/interfaces'", checking I found the solution, this interfaces be on "angularfire2/database/interfaces".

adriancarriger commented 7 years ago

Hi @esgantivar, it should work if you change your angularfire2 version to 4.0.0-rc.0

Sounds related to #62, #63

esgantivar commented 7 years ago

Hi @adriancarriger, my app has "^ 4.0.0-rc.2" angularfire2. When I apply this patch over the source code, my project compiles successfully. But other problems arose, I tried to disconnect wifi and Angularfire2 shows the connection error.

ggravand commented 7 years ago

Hi @adriancarriger ! I also have this issue and can see you made a patch, great! However, the change is not yet on npm and when I try to install using the following commandline as suggested by the Internet to install from github, my application cannot find the module afterwards:

npm install https://github.com/adriancarriger/angularfire2-offline/tarball/master --save

This is of course not specific for your library but perhaps you have an idea anyway? Or maybe you could publish the fix to npm as a pre-release?

Thanks in advance!

adriancarriger commented 7 years ago

Hi @ggravand, I was having an trouble reproducing the issue locally, but I have published a prerelease to npm under version 4.2.5

Let me know if setting your package.json to include the following fixes the issue:

"angularfire2": "4.0.0-rc.2",
"angularfire2-offline": "4.2.5",

If this works, I'll set 4.2.5 as the default npm version 👍

Thanks!

jwuliger commented 7 years ago

@adriancarriger Thanks for this great lib! I just started using it and have been following this thread.

I just changed my package.json deps to:

"angularfire2": "4.0.0-rc.2" from RC.0 "angularfire2-offline": "^4.2.5" from 4.2.4

I am not sure if the errors I am getting when I try to build are related to this issue, but it looks like it may be. Here are the errors I am getting when trying to build with the latest Angular CLI:

ERROR in C:/Viven-Final/_viven-develop/node_modules/angularfire2-offline/database/list/emulate-query.d.ts (1,41): Cannot find module 'angularfire2/interfaces'.

ERROR in C:/Viven-Final/_viven-develop/node_modules/angularfire2-offline/database/list/afo-list-observable.d.ts (1,41): Cannot find module 'angularfire2/interfaces'.

ERROR in C:/Viven-Final/_viven-develop/node_modules/angularfire2-offline/database/interfaces.d.ts (1,41): Cannot find module 'angularfire2/interfaces'.

ERROR in C:/Viven-Final/_viven-develop/node_modules/angularfire2-offline/database/database.d.ts (2,68): Cannot find module 'angularfire2/interfaces'.

Thanks so much for any help!

jwuliger commented 7 years ago

@adriancarriger OK so version 4.2.5 DOES work with AngularFire RC 2. What was happening to me when I was testing, is that I had "angularfire2-offline": "^4.2.5" with ^ being included. When I would do an install it was installing a version of AFO at 4.3.0. I had no idea there was a 4.3.0 lol. So I pinned directly to 4.2.5 and now everything works!

ggravand commented 7 years ago

Hi @adriancarriger, confirmed - it works with

"angularfire2": "4.0.0-rc.2",
"angularfire2-offline": "4.2.5"

Thanks a lot 👍

adriancarriger commented 7 years ago

Awesome, glad to hear it's working! 🎉 🎉 🎉

Here are some changes I made:

Let me know if I missed anything. Thanks!