0
votes

I'm currently learning how to develop a new app in Firefox OS, following step-by-step the MDN tutorial starting here : https://developer.mozilla.org/en-US/Apps/Build/Modern_web_app_architecture

Everything went pretty smoothly until the part concerning the Model, here : https://developer.mozilla.org/en-US/Apps/Build/Modern_web_app_architecture/Models_and_application_data

Specifically at the point of installing LocalForage.
I tried the first :

ember install:addon ember-localforage-adapter

And got the error message described in the tutotrial, so I tried the other command bower install localforage -v '1.2.2' It just returned the bower version.
So I tried bower install localforage alone and it worked. I got the new folder in myapp/bower_components/localforage.

The tutorial next gives the instruction to use the code :

import LFAdapter from 'ember-localforage-adapter/adapters/localforage';

export default LFAdapter.extend({
    namespace: 'ShoppingLists'
});

Here is where I'm stuck. I got the error message :

Error while processing route: lists.index Could not find module 'ember-localforage-adapter/adapters/localforage' imported from `'myapp/adapters/application' requireFrom@http://localhost:4200/assets/vendor.js:119:1

I didn't get the logic behind the import call, no ember-local-forage-adapter folder or something similar. I'm not comfortable with namespaces yet, but I know the theory. Is there a namespace problem somewhere I can't recognize ? Is it related to ember-data ?

I can give the full error message, but I'm pretty sure that won't help.
I did my best to figure it out alone, but I ran out of ideas, so I'm asking here.

Thank you for the help :)

1

1 Answers

1
votes

I found the solution, that seems pretty trivial now, but as I found some similar subjects across the interweb, I'm gonna share it.

Run the additional command :

ember install ember-localforage-adapter

Now it works, at least I don't have the error message, and I can move on in the tutorial.