0

I am trying to install ember-simple-auth in ember CLI, but something is wrong. I have created a new ember CLI project, and run the following to install ember-simple-auth.

npm install --save-dev ember-cli-simple-auth
ember generate ember-cli-simple-auth

I also ran bower install just to make sure I wasn't missing anything else, and have checked that ember-simple-auth does exist in bower_components. However, when I try to import it using

import Base from 'simple-auth/authorizers/base';

ember server throws an error:

ENOENT, no such file or directory '/home/me/Projects/spa_client/tmp/tree_merger-tmp_dest_dir-8L6qfwzZ.tmp/simple-auth.js'

What have I missed?

Edit

Ember CLI version:

$ ember -v
version: 0.0.46
node: 0.10.25
npm: 1.4.27
aquavitae
  • 17,414
  • 11
  • 63
  • 106

1 Answers1

0

The ember-cli-simple-auth shim whould import the necessary bits automatically, when faced with ENOENT in similar situations I often find that it can be cleared by simply doing rm -r tmp to clear the ember-cli tmp directory and force it to re-build - seems like ember-cli doesn't pick-up some of the new pieces without a complete re-build of the directory structure.

If you dispense with the ember-cli shim and go down the bower route you need to app.import in your Brocfile? Something like:

app.import('bower_components/ember-simple-auth/ember-simple-auth.js');
Al_M
  • 63
  • 6
  • No, the Ember CLI Addon imports Ember Simple Auth's AMD build automatically - or should at least. – marcoow Sep 30 '14 at 21:50