title: AngularJS: Unknown provider: $$cookieReaderProvider <- $$cookieReader <- $cookies
body: <p>My main module definition:</p>
  
  <pre><code>angular.module('app', ['app.animators', 
                         'app.places', 
                         'app.orders', 
                         'app.excursions', 
                         'app.events', 
                         'app.hotel', 
                         'app.controllers', 
                         'app.services',
                         'angular-img-cropper',
                         'ui.router', 
                         'templates', 
                         'ngResource', 
                         'ngCookies', 
                         'ui.bootstrap', 
                         'ngImgCrop', 
                         'angularjs-dropdown-multiselect', 
                         'uiGmapgoogle-maps'])
    .config(['$httpProvider', '$locationProvider', '$stateProvider', '$urlRouterProvider', ($httpProvider, $locationProvider, $stateProvider, $urlRouterProvider) -&gt;
      $httpProvider.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content')
  
      $urlRouterProvider.otherwise("/admin/home")
  
      $stateProvider.state('admin.services'
        url: '/services'
        controller: 'ServicesController'
        templateUrl: 'services.html'
      ).state('admin.home'
        url: '/home'
        templateUrl: 'home.html'
      ).state('signIn'
        url: '/admin/signin'
        controller: 'SignInController'
        templateUrl: 'signin.html'
        resolve:
          user: ['authService', '$q', (authService, $q) -&gt;
                  $q.reject({ authorized : true }) if authService.currentUser()
          ]
      ).state('admin.signOut'
        url: '/signout'
        controller: 'SignOutController'
      ).state('404'
        url: '/404'
        templateUrl: '404.html'
      ).state('admin'
        abstract: true
        url: '/admin'
        template: '&lt;ui-view /&gt;'
        resolve:
          user: ['authService', '$q', (authService, $q) -&gt;
                  $q.reject({ unAuthorized : true }) unless authService.currentUser()
                ]
      )
  
      $locationProvider.html5Mode(true)
  ])
  </code></pre>
  
  <p>Also in index.html is <code>&lt;script src="/assets/angular-cookies/angular-cookies.js?body=1"&gt;</code>. I get the error in this module:</p>
  
  <pre><code>angular.module('app.services', []).factory('authService', ['SIGN_IN_ENDPOINT', 'SIGN_OUT_ENDPOINT', '$http', '$cookies', (SIGN_IN_ENDPOINT, SIGN_OUT_ENDPOINT, $http, $cookies) -&gt;
      auth = {}
      auth.signIn = (credentials) -&gt;
          return $http.post(SIGN_IN_ENDPOINT, { user: credentials })
      auth.signOut = -&gt;
          return $http.delete(SIGN_OUT_ENDPOINT)
      auth.currentUser = -&gt;
          $cookies.remember_token
  
      auth
  ]).value('SIGN_IN_ENDPOINT', "#{ location.protocol }//#{ location.host }/sign_in").value('SIGN_OUT_ENDPOINT', "#{ location.protocol }//#{ location.host }/sign_out")
  .factory("httpErrorInterceptorModule", ["$q", "$rootScope", "$location", ($q, $rootScope, $location) -&gt;
    success = (response) -&gt;
      return response;
  
    error = (response) -&gt;
      if(response.status is 401)
        $location.path('/admin/signin')
        return $q.reject(response)
  
    return (httpPromise) -&gt;
      return httpPromise.then(success, error)
  ]).config(["$httpProvider", ($httpProvider) -&gt;
    $httpProvider.responseInterceptors.push("httpErrorInterceptorModule")
  ])
  </code></pre>
  
  <p>Error is: <code>Error: [$injector:unpr] Unknown provider: $$cookieReaderProvider &lt;- $$cookieReader &lt;- $cookies &lt;- authService</code></p>
  
  <p>What I do wrong? AngularJS version is 1.2.25.</p>