Search code examples
javascriptangularjsinternationalizationangular-translate

angular-translate module 'pascalprecht.translate' not found


I'm trying to add angular-translate to my angular app. I followed this simple quick start: https://angular-translate.github.io/docs/#/guide, but my app won't bootstrap, giving me the following error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:modulerr] Failed to instantiate module pascalprecht.translate due to: Error: [$injector:nomod] Module 'pascalprecht.translate' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

My index.html file is properly including angular-translate like so:

<script src="bower_components/angular-translate/angular-translate.js"></script>

Any clue why this could be happening?. I'd really appreciate the help.

UPDATE

Here's part of my app.js to clarify things a bit:

var app = angular.module('myApp', [
  'ngAnimate',
  'ngCookies',
  'ngResource',
  'ngSanitize',
  'ngTouch',

  // 3rd party modules.
  'ui.router',
  'restangular',
  'angular.filter',
  'ui.bootstrap',
  'pascalprecht.translate',


  // Custom modules.
  'myApp.config'
])
.
.
.

Solution

  • It was failing because of another dependency throwing an error, specifically jquery.easy-pie-chart. I wasn't using that dependency at all so I removed it and angular-translate started working without a problem.