Search code examples
bowerember-clinode-modules

Ember server only resolves files with the bower path used in the brocfile


In my ember cli app I have moment in both directories, but my ember server only works with the bower path, in my borcfile:

app.import("bower_components/moment/min/moment.min.js");

app.import("node_modules/moment/min/moment.min.js");

the latter says that it can't find it.


Solution

  • In order to reference node modules you ll need to import them by their name, the simplest example is: import Ember from 'ember'.

    For more info regarding modules and the resolver refer to this part of the documentation