MongoError: Index with name: profile.name already exists with different options

Hi,

I’m trying to update to meteor 2.4 from 2.3.7 and I get this error now.

Tried to reset meteor, searched for all occurences of _ensureIndex. I even forked jagi:astronomy to replace _ensureIndex by createIndex but I still get this error.

Anyone can help me ?

Thanks

it’s not about using _ensureIndex or createIndex function. The error occurred when you try to create index named profile.name on a single collection with different options.
For example in one file you create an index named profile.name with

Users.createIndex(
  {
    _id: 1,
    "profile.id": 1,
  },
  { name: "profile.name" }
);

In other file, you create an index with the same name profile.name with

Users.createIndex(
  {
    "profile.id": 1,
    "profile.address": 1,
  },
  { name: "profile.name" }
);

Find all of them and remove or use different name for index.

// you may need to drop existing index in the database to clear the error.

Thanks a lot but I don’t have any _ensureIndex or createIndex in my code. And I have no error with meteor 2.3.7
Astronomy is creating indexes but why is it failing in meteor 2.4 ???

Maybe they changed the index options, add/remove fields … but forgot to drop existing one.