i get this error when i'm tring to use electron app with angular-localforage
Opened this issue · 5 comments
Uncaught Error: Cannot find module 'localforage'
Uncaught Error: [$injector:modulerr] Failed to instantiate module intouch due to:
Error: [$injector:modulerr] Failed to instantiate module LocalForageModule due to:
Error: [$injector:nomod] Module 'LocalForageModule' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Sounds like the module isn't being included by your module bundler (webpack/browserify/rollup/etc). Can you provide a bit more detail and maybe your main angular.module('yourModule', ['LocalForageModule'])
declaration?
I am having the same issue and still doesn't know why...
Can you provide some more detail about your build process and your module declaration? I use this module in my Electron app with no problems, so I imagine there is something in your configuration that is a little off.
@mostafa-raafat and/or @Maximeesilv
I'm going to close this issue since I haven't heard back from either of you about this issue, so I'm going to assume it's now working for you.
Feel free to re-open it if you have more details to share.
Oh, actually, I just re-read the issue y'all were having:
You have to load localforage
before you loading this library. If you're using a bundler, make sure you have localforage
installed and that it is available to this module to consume. If you're not bundling, make sure you load the localforage
script before this one. Open back up if you have anymore questions!
I'll add a little helpful error messaging around this as I've been bitten by this before, too! 👍