0

I am trying to do a simple thing : use addons in the default project created with the command

ember new myproject

The initial project does compile: I can see the welcoming message on localhost:4200. Any addon I choose to add is installed the same way:

ember install theAddon

I can see the newly added addon in the package.json file. I have read that on build process ember will scan the dependencies (listed in package.json) and will create class instances for dependency which has the ember-addon keyword listed in their dependency file. So if I understand this correctly it is done automatically. Well when I run I always get

Uncaught Error: Assertion Failed: A helper named 'my-addon' could not be found.

For example one that I tried is

ember-radio-button

and it complains that it cannot find 'radio-button' helper

davejal
  • 6,009
  • 10
  • 39
  • 82
RRPitre
  • 121
  • 1
  • 7
  • Did you get a `Installed addon package.` message after running `ember install ember-radio-button`? I just tried this addon in a fresh project and got no errors when using `{{radio-button}}` in a template. It sounds like the addon wasn't installed correctly. – Tom Netzband Nov 19 '15 at 17:42
  • I re-installed ember and create a new project and added the addon, Exactly what I did the first time and it worked. I have no idea why it did not work the first time – RRPitre Nov 20 '15 at 02:44

1 Answers1

0

When installing an addon you need to restart the ember server. Installing an addon modifies the build environment.

After killing the server and restarting with ember s or ember server the addon can be used safely.

morhook
  • 685
  • 7
  • 19