Meteor and Johnny-five have a duplicated class name, How to use it together?

In johnny-five library there is

lib/mixins/collection.js

which duplicate to

Meteor.collection

  1. When my code doesn’t include Meteor.collection involve everything works fine
  2. After I include Meteor.collection involve it cause this error

dupmeteorjohnny

  1. If I delete this code in my model.js everything works.
    Status = new Mongo.Collection('status');

How to use both awesome things together?

Are you using Meteor 1.3? Then I would advise to use npm install johnny-five to install this library in your project. Next you can use import statements to safely import without conflicts.

(untested)

import { Collection } from 'johnny-five';

const myColl = new Collection();

Placing such libraries inside a lib folder is indeed asking for troubles.

@smeijer Oh I just use some reservation variable which I assign name Map then I change a variable name to MapPosition and everything is working right now :+1:

Thank you