Uncaught Error: [$injector:modulerr] Failed to instantiate module App due to: Error: [$injector:unpr] Unknown provider: e

630 views
Skip to first unread message

Jerry Thompson

unread,
Jul 8, 2019, 2:37:34 AM7/8/19
to Angular and AngularJS discussion
I have been working  on a Rails spa app with an AngularJs frontend.  Has worked fine in development,
but when I pushed it up to a staging environment where I am using Nginx, reverse proxy with Puma I began getting 
this error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module App due to: Error: [$injector:unpr] Unknown provider: e

Bit of a novice troubleshooting javascript errors that have been minified so not sure how to track this down.

I believe this is a common error from injection, but I believe i have used the format

angular.module('App')
  .controller 'MyCtrl', [
    'AlchemyResource'
    'Restangular'
    '$scope'
    ( AlchemyResource
      Restangular
      $scope) ->
   ]

that prevents argument mangling.

So how do I track down where this in happening?

Thanks!
   Jet

Sander Elias

unread,
Jul 9, 2019, 1:12:19 AM7/9/19
to Angular and AngularJS discussion
Hi Jerry,

This is almost always an issue with minification of something that doesn't has the correct format somewhere. 
I would look for a tool that puts those formats in place, there are a few available.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages