question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'pascalprecht.translate' not found even though it's there in the js files.

See original GitHub issue

Subject of the issue

I just can’t load pascalprecht.translate as a dependency. Error message from angular: 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.

angular.module('app', [
'app.run',
'app.filters',
'app.services',
'app.components',
'app.directives',
'app.routes',
'app.config'
]);

angular.module('app.run', []);
angular.module('app.routes', []);
angular.module('app.filters', []);
angular.module('app.services', []);
angular.module('app.config', []);
angular.module('app.directives', []);
angular.module('app.components', [
'ui.router',
'angular-loading-bar',
'restangular',
'ngStorage',
'satellizer',
'ngSanitize',
'ngResource',
'ngTouch',
'ngAnimate',
'ngResource',
'ui.load',
'pascalprecht.translate'
]);

I CAN find the angular-translate module in my .js file and it should be loadable. My final.js file is structured like this:

  • angular.js
  • lots of other libs
  • angular-translate.js
  • my.app.js file

I uploaded my final.js in a zip here, if it’s of any help. final-0d08d1d216.js.zip

Im using Bower to manage my dependecnies, and everything else works when I remove the angular-translate dependency. I’m stuck on this for weeks now. I don’t know how to debug this properly. Any hints are very very welcome. If you need more info just tell me.

Enviroment

  "angular-translate": "^2.15.0"
  "angular": ">=1.5.x"

latest chrome and firefox versions.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Tebracommented, Mar 6, 2017

A quick update, I deleted all the other dependencies from my bower.json and added only angular.js and angular-translate.js and now it’s working. So my setup is ok.

I will now add the other dependencies one after the other to try and find out which one is causing the collision with angular-translate.

I will post my findings here in hope that it helps other people.

1reaction
knallicommented, Mar 6, 2017

Ok, great you have find the problem. Looking forward, I’m closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular-translate module 'pascalprecht.translate' not found
translate due to: Error: [$injector:nomod] Module 'pascalprecht.translate' is not available! You either misspelled the module name or forgot to load it. If ......
Read more >
Doc: Guide - Angular Translate
Make sure to embed it in your HTML document. ... Inject angular-translate module as a dependency into your app: var app = angular.module('myApp',...
Read more >
Internationalize Your AngularJS App - Toptal
Internationalizing modern apps can be a little tricky. AngularJS, with the help of a few tools, makes internationalizing and localizing your app a...
Read more >
Internationalisation In AngularJS Apps With Angular Translate ...
Inside this bundle you'll find angular-translate.min.js file ... First, this module requires pascalprecht.translate as dependency, so add it ...
Read more >
Localization |
The angular-translate library comes with built-in directives and filters that make it ... It handles not only JavaScript libraries, but also HTML, CSS, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found