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

In johnny-five library there is


which duplicate to


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


  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.


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