Ggutt
Ggutt

Reputation: 11

package dependency conflict

I'm currently developing a small test project using angular meteor. How ever I tried to add the angular-ui calendar package and it breaks my project.

I get a warning: "WARNING: Tried to load angular more than once.".

And all my modules causing the following error: "Uncaught TypeError: _angular2.default.module(...).component is not a function"

I've figuered, I believe, it out to be caused by angular-ui beeing dependant on angular 1.4.8 and my project is using angular 1.5.5.

I've tried to manipulate the package file and move the "angularui:ui-calendar"-package to the top with no effect.

Is there a workaround availible for dependancy conflicts?

Edit: Repo of minimal code

Upvotes: 0

Views: 329

Answers (1)

Mark Leiber
Mark Leiber

Reputation: 3138

The console error says:

foo.js:14 Uncaught TypeError: _angular2.default.module(...).component is not a function ... foo.js line 14

As you said, that's because of the angular version being used. Edit the version in .meteor/versions:

angular:[email protected]_1

That resolves your error. When you start trying to use the calendar you may find issues if you don't pay attention to the note on https://atmospherejs.com/angularui/ui-calendar, which says:

Important Include FullCalendar if the source is missing in your app: meteor add planettraining:jquery-fullcalendar

Upvotes: 1

Related Questions