ember-cli-cookie icon indicating copy to clipboard operation
ember-cli-cookie copied to clipboard

Uncaught Error: Assertion Failed: The initializer 'token-cookie' has already been registered

Open hoylemd opened this issue 10 years ago • 0 comments

I'm trying to use this plugin in my app, but I'm getting the above error when I try to inject the cookie into my routes.

This is my initializer, at app/initializers/token-cookie.js

import Ember from 'ember';

export default Ember.Application.initializer({
  name: "token-cookie",
  after: ['cookie'],
  initialize: function(container, application) {
    application.inject('route', 'cookie', 'cookie:main');
  }
});

it's copied almost directly from the npm page, but it's blowing up immediately.

hoylemd avatar Dec 09 '15 03:12 hoylemd