Search code examples
angularjsmeteorangular-leaflet-directive

Using angular from both atmosphere and npm gives warning


Using Meteor 1.3.2.4 I do:

meteor create myapp
cd myapp
meteor npm install --save angular
meteor add angularjs:angular

and in main.js add as first line

import angular from 'angular';

This gives me

WARNING: Tried to load angular more than once.

in the browser console.

I guess this is because angular packages from both npm and atmosphere are added, but I do not know how to circumvent this if I need an atmosphere package that depends on angularjs:angular and also want to to use angular from npm (for example when using angular-meteor). More specifically I want to use the package angular-leaflet-directive in a meteor/angular app. Any suggestions ? I asked the same question here.


Solution

  • The package author needs to follow those instructions here to make his package work on both Meteor 1.3 and Meteor 1.2 and earlier.

    Maybe you could submit a pull request for him and until he will merge it, you could publish to Atmosphere under your own user.

    Also, you could just bring angular-leaflet-directive from npm!