bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

ui.bootstrap.carousel of 0.13.3 giving some error when using with grunt-ngdocs

Open jquerygeek opened this issue 11 years ago • 13 comments

I was try to update ui.bootstrap to 0.13.3, but its giving some issue with my docs page, where I am using grunt-ngdocs. The problem is mainly on animation() method of ui.bootstrap.carousel, without that my docs page working fine.

Th error is below.

Error: [$injector:modulerr] Failed to instantiate module demo due to:
Error: [$injector:modulerr] Failed to instantiate module components.core.config due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap.carousel due to:
TypeError: Cannot read property 'apply' of undefined

jquerygeek avatar Aug 31 '15 20:08 jquerygeek

What version of Angular are you using? Can you create a simple reproduction of the problem on Plunker?

wesleycho avatar Aug 31 '15 21:08 wesleycho

Angular 1.4.5 Angular ui bootstrap 0.13.3

Actually can't reproduce the flow in Plunker as the flow is a bit complex when build system build my ui-component docs page which load the page with ngdocs and those components using the ui.bootstrap as dependency.

jquerygeek avatar Aug 31 '15 22:08 jquerygeek

Similar problem here.

@jquerygeek, there was a version where your problem was not happening?

My stack is the following:

Error: [$injector:modulerr] Failed to instantiate module example due to:
[$injector:modulerr] Failed to instantiate module myApp.utils due to:
[$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
[$injector:modulerr] Failed to instantiate module ui.bootstrap.carousel due to:
provider[invokeArgs[1]] is undefined

And I also got this in a page built with ngdocs, so building a plunkr is quite impossible for me.

@wesleycho could it be a conflict between ngdocs bootstrap and this one?

imbalind avatar Sep 07 '15 16:09 imbalind

For me, angular 1.4 and ngdocs was working fine with angular-bootstrap .12.5, facing this problem with latest angualr-bootstrap 13.3.

So far I got problem is in .animation() method on ui.bootstrap.carousel module. If you remove this from angular-bootstrrap, ngdocs working fine without error.

jquerygeek avatar Sep 07 '15 16:09 jquerygeek

This is pretty much impossible to debug without a reproduction.

wesleycho avatar Sep 07 '15 23:09 wesleycho

@wesleycho I managed to "port" our documentation to plunkr, it's lacking some CSS's but it's enough to reproduce the error I got.

You just need to click on: "extendHeight" and the error pops up.

imbalind avatar Sep 09 '15 08:09 imbalind

This is still extremely hard to debug and extraordinarily time consuming - this needs to be distilled into a clearer reproduction where the culprit is exposed clearly. I still have no clue whether it is truly UI Bootstrap at fault here, and it is not efficient to debug this deeply given the amount of issues & lack of resources available for working on this project.

wesleycho avatar Sep 09 '15 08:09 wesleycho

Yeah, I see.

I will give a look at it myself as soon as I have enough time.

imbalind avatar Sep 09 '15 14:09 imbalind

@jquerygeek @wesleycho I think UI bootstrap not to be the culprit and I decided to solve the problem by using a custom template in ngdocs which calls a custom angular-bootstrap-prettify.js file.

In that file I commented the following line:

        //$provide.value('$animate', $animate);

which, in my understanding, was creating a sort of mocked $animate module.

I think you should close this issue.

imbalind avatar Sep 12 '15 20:09 imbalind

@imbalind was commenting that line, helped you to get rid of the error ? I am still getting same.

jquerygeek avatar Sep 14 '15 18:09 jquerygeek

@jquerygeek yes it did.

I'm afraid we are facing different issues then...

imbalind avatar Sep 15 '15 07:09 imbalind

Closing, as this is not actionable without a more isolated example to work off of & indications that this is truly a problem with grunt-ngdocs.

wesleycho avatar Oct 15 '15 05:10 wesleycho

Was there ever a solution to this?

mattspaulding avatar Sep 01 '16 00:09 mattspaulding