0

Not sure if this is the appropriate place for this question, but when I simply updated my Angular script from 1.4.8 to 1.5.11, the UI bombs out and throws an error when attempting to do an angular.bootstrap(...):

https://code.angularjs.org/1.5.11/docs/error/$injector/modulerr?p0=ckwy4037000003e8twhn1wp0a&p1=Error: [$injector:modulerr] http://errors.angularjs.org/1.5.11/$injector/modulerr?p0=sn.common.attachments&p1=Error: [$injector:nomod] http://errors.angularjs.org/1.5.11/$injector/nomod?p0=sn.common.attachments
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:9:426
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:28:235
    at b (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:27:282)
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:28:20
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:43:17
    at q (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:10:371)
    at g (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:42:382)
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:43:34
    at q (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:10:371)
    at g (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:42:382)
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:9:426
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:43:292
    at q (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:10:371)
    at g (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:42:382)
    at http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:43:34
    at q (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:10:371)
    at g (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:42:382)
    at fb (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:46:381)
    at c (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:24:19)
    at Object.Gc [as bootstrap] (http://localhost:8080/scripts/angular_includes_1.5.11.jsx?v=Wed_Dec_08_12_09_54_PST_2021:24:332

...wondering if anyone else has come across this issue, and if they have an idea of what's going on?

I'm not really familiar with Angular, but from looking at the docs, when I compare between v1.4.8 and v1.5.11, the only difference I see is the two yellow banners - one in particular that says:

Note: Do not bootstrap the app on an element with a directive that uses transclusion, such as ngIf, ngInclude and ngView. Doing this misplaces the app $rootElement and the app's injector, causing animations to stop working and making the injector inaccessible from outside the app.

This looks related, but I'm not 100% certain that that may be...

5
  • You need to provide more details. Otherwise, it's just guessing what could be done here. I would recommend to try smaller upgrade steps, meaning to start from 1.4.8, upgrade to 1.4.9, then 1.4.10, and so on, unless you come to the point where the error starts showing up. Then check the changelog for (backwards incompatible) changes between the two versions. Also, you should check whether your external libraries (if any) need to be upgraded as well. Commented Dec 15, 2021 at 21:45
  • 1
    Are you still providing sn.common.attachments, per your error URL? Commented Dec 15, 2021 at 23:00
  • @twwwt the only difference is with the update of the Angular version... but thanks for the suggestion, I will take upon it and maybe approach it via a binary search approach with the version numbers to shave off some time! Commented Dec 15, 2021 at 23:00
  • @JeffBowman ahh, perhaps that is the case... let me see if those dependencies have been modified in our scripts... Commented Dec 15, 2021 at 23:16
  • 1
    @JeffBowman you were right! It was a bad path (changed the version number in the path, but that path doesn't exist for that version)... Thank you!!!! Commented Dec 16, 2021 at 18:08

1 Answer 1

1

Fixed in the comments:

Are you still providing sn.common.attachments, per your error URL?

you were right! It was a bad path (changed the version number in the path, but that path doesn't exist for that version)... Thank you!!!!

Angular employs a technique where its error messages are encoded as URLs, which enables more-informative and translatable error messages without bloating the production app size. Consequently, that first https://code.angularjs.org/ URL actually contains the real $injector:nomod error that the URL target describes. From there it's easier to see that the bootstrap failed due to the absence of a module, here sn.common.attachments specifically.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.