title: Ember CLI generate component in an addon
body: <p>I try to make an addon using ember-cli. Here it is step by step what I have done so far:</p>
  
  <pre><code>sudo ember addon test-addon
  cd test-addon
  sudo ember serve 
  </code></pre>
  
  <p>now the server runs and on localhost:4200 I can see the test/dummy app's application hbs. </p>
  
  <blockquote>
    <p><strong>Welcome to Ember.js</strong></p>
  </blockquote>
  
  <p>Its time to make some components for the addon:</p>
  
  <pre><code>sudo ember g component my-form
  </code></pre>
  
  <p>In the <strong>tests/dummy/app/templates/application.hbs</strong> I added 
  <strong>{{my-form}}</strong></p>
  
  <p>And now I'm getting the following js error:</p>
  
  <p><em>Uncaught Error: Could not find module <code>test-addon/components/my-form</code> imported from <code>dummy/components/my-form</code></em></p>
  
  <h2>edit</h2>
  
  <p>After struggling a little bit with npm, I tried it again (without sudo) and the same thing happened. I'm on Ember CLI 0.2.1. Here are my files, but they should be the same since they are auto-generated. The error is thrown from <strong>bower-components/loader.js/loader.js line 110</strong>.</p>
  
  <p><strong>addon/components/my-form.js</strong></p>
  
  <pre><code>import Ember from 'ember';
  import layout from '../templates/components/my-form';
  
  export default Ember.Component.extend({
    layout: layout
  });
  </code></pre>
  
  <p><strong>addon/templates/components/my-form.hbs</strong></p>
  
  <pre><code>{{yield}}
  </code></pre>
  
  <p><strong>app/components/my-form.js</strong></p>
  
  <pre><code>import myForm from 'test-addon/components/my-form';
  
  export default myForm;
  </code></pre>