generator-angular icon indicating copy to clipboard operation
generator-angular copied to clipboard

grunt serve:dist generates Failed to instantiate module

Open palaman opened this issue 9 years ago • 6 comments

When I create a fresh new project with "yo angular" and all the default options, "grunt serve" works perfectly. But when I try to serve the dist version with "grunt serve:dist", I get this error in the browser console:

Uncaught Error: [$injector:modulerr] Failed to instantiate module yoTestApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngAnimate due to:
Error: [$injector:nomod] Module 'ngAnimate' 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.

I've look inside vendor.js and ng-animate is there.

Thanks in advance for the help.

palaman avatar Jul 14 '16 16:07 palaman

+1 I've test with the original generated files and same problem

darmoor avatar Jul 18 '16 13:07 darmoor

Same thing. Is there some sort of work-around for this?

JamesIves avatar Jul 20 '16 12:07 JamesIves

+1 same issue here. Did you guys find any solution?

ceolinwill avatar Jul 25 '16 14:07 ceolinwill

@palaman @darmoor @JamesIves @wceolin

This is the same issue as #1336

Either removing bootstrap.js or downgrading it resolves the issue.

Looking at the bootstrap sass repo looks like this will be resolved in the next release: https://github.com/twbs/bootstrap-sass/blob/master/bower.json

Rather than the existing jQuery version in v3.3.6 https://github.com/twbs/bootstrap-sass/blob/v3.3.6/bower.json

If you are using automatic deployment using grunt build you'll need to update jQuery's bower component afterwards manually if you need bootstrap.js

bower uninstall jquery bower install jquery#2.2.4

jamiemagique avatar Jul 25 '16 15:07 jamiemagique

Thank you. Works perfectly!

palaman avatar Jul 25 '16 17:07 palaman

Hi! im having the same issue, but with "daterangepicker". Im working nice with "grunt serve" but, when "grunt" get this error.

Uncaught Error: [$injector:modulerr] Failed to instantiate module sierraPaneladminApp due to:
Error: [$injector:modulerr] Failed to instantiate module daterangepicker due to:
Error: [$injector:nomod] Module 'daterangepicker' 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.

Working with Angular 1.5.9, Jquery 2.2.4

¡Saludos!

cuervotronic avatar Sep 19 '17 14:09 cuervotronic