Skip to content

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

Description

@hoylemd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions