0

I have an angular app that is suddenly broken in elastic beanstalk. It was working fine, then when deployed via elastic beanstalk, it suddenly started throwing the following error:

Error: [$injector:nomod] Module 'BookModule' 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 definition for the BookModule app looks like this:

 var BookModule = angular.module('BookModule', ['ui.select',
  'ngSanitize',
  'blockUI',
  'ngAnimate',
  'ui.bootstrap',
  'restangular',
  'ui.grid',
  'ui.grid.resizeColumns',
  'ui.grid.moveColumns',
  'angularLazyImg',
  'angularSpinner',
  'bootstrapLightbox',
  'angularjs-dropdown-multiselect',
  'datatables',
  'datatables.select',
  'datatables.bootstrap'
]);

And my Bowerfile looks like this

# asset 'bootstrap'

asset 'papaparse'
asset 'angular-ui-grid'
asset 'underscore'
asset 'restangular'
asset 'angular', '1.5.8'
asset 'leaflet-draw'
asset 'leaflet.fullscreen'
asset 'angular-bootstrap'
asset 'angular-ui-select'
asset 'angular-sanitize', '1.5.8'
asset 'angular-spinner'
asset 'angular-block-ui'
asset 'angular-bootstrap-lightbox'
asset 'angular-animate', '1.5.8'
asset 'datatables.net', '1.10.13'
asset 'datatables.net-select', '1.2.2'
asset 'angular-datatables', '0.5.6'
resolution "angular", "1.5.8"

The error appears on all deployments, only in production (on ebs) and even with old versions of the app where the error didn't appear previously. This makes me think that one of the above libraries got updated causing the problem. How can I find out which one, or if this is indeed the problem?

sakurashinken
  • 3,940
  • 8
  • 34
  • 67

1 Answers1

0

It turns out that leaflet was updated leading to an incompatible version. I looked at a working instance on EB and and ran the code given here to check the version of installed packages. How do I find out what version of a bower package is actually installed?. I then went back to a broken one, and diffed the results. Solution was to lock down all software versions in bower to those from the working instance.

sakurashinken
  • 3,940
  • 8
  • 34
  • 67