generator-cg-angular
generator-cg-angular copied to clipboard
Build - $inject:nomod
I'm getting this error after building or with serve:dist
vendor.js:9279Uncaught Error: [$injector:nomod] Module 'dmrApp' 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.
http://errors.angularjs.org/1.5.8/$injector/nomod?p0=dmrApp(anonymous function) @ vendor.js:9279(anonymous function) @ vendor.js:11293n @ vendor.js:11217(anonymous function) @ vendor.js:11291(anonymous function) @ app.js:1
vendor.js:9279 Uncaught Error: [$injector:modulerr] Failed to instantiate module dmrApp due to:
Error: [$injector:nomod] Module 'dmrApp' 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.
http://errors.angularjs.org/1.5.8/$injector/nomod?p0=dmrApp
at http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:376
at http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:10542
at n (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:10015)
at http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:10327
at http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:19680
at r (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:824)
at f (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:19528)
at rt (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:21453)
at a (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:8085)
at ie (http://localhost:3002/scripts/vendor-7dc26fb0a5.js:31:8395)
http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=dmrApp&p1=Error%3A%…http%3A%2F%2Flocalhost%3A3002%2Fscripts%2Fvendor-7dc26fb0a5.js%3A31%3A8395)
It' very weird and I cannot get rid of it.
Here's the modules
angular .module('dmrApp', [ 'ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ngMessages', 'ngAria', 'ui.router', 'ui.bootstrap', 'ngStorage' ]);
Here's the structure :
Same problem here, is there a solution ?
This is the same issue as #102, the version of ngAnnotate used by the cg-angular generator is outdated. To update it, in the root of your application there should be a package.json file. You need to change version on the line "grunt-ng-annotate" to "~0.10.0", and then save the file. Then from the command line and in the root directory of your app, run 'npm update grunt-ng-annotate'. Then try your build process again.