Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

grunt serve:dist generates Failed to instantiate module #1344

Open
palaman opened this issue Jul 14, 2016 · 6 comments
Open

grunt serve:dist generates Failed to instantiate module #1344

palaman opened this issue Jul 14, 2016 · 6 comments

Comments

@palaman
Copy link

palaman commented Jul 14, 2016

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.

@darmoor
Copy link

darmoor commented Jul 18, 2016

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

@JamesIves
Copy link

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

@wceolin
Copy link

wceolin commented Jul 25, 2016

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

@jamiemagique
Copy link

jamiemagique commented Jul 25, 2016

@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

@palaman
Copy link
Author

palaman commented Jul 25, 2016

Thank you. Works perfectly!

@palaman palaman closed this as completed Jul 25, 2016
@palaman palaman reopened this Jul 25, 2016
@cuervotronic
Copy link

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants