Meteor with Ionic on iOS


#1

I am using Ionic 2 and Meteor. I built an app in Windows and it runs perfectly on an Android platform.

I now have OSx and am trying to build the app fro iOS. I have installed npm, cordova successfully.

And:

ionic platform add ios

But when I run:

ionic serve

I get no errors in the CLI, but when I try access the app in Firefox:

localhost:8100

The Firebug console reports the following error:

      Error: There is already a collection named "chats"
require<.node_modules.meteor.mongo["collection.js"]/Mongo.Collection

This error does not happen in an Android/Windows environment.

Code

chats.ts

  import { Chats, Messages } from 'api/collections';
  ...

  public chats: Mongo.Cursor<Chat>;

collections.ts

  import {Mongo} from 'meteor/mongo';
  import {Chat, Message} from 'api/models';
  
  export const Chats: Mongo.Collection<Chat> = new Mongo.Collection<Chat>('chats');
  export const Messages: Mongo.Collection<Message> = new Mongo.Collection<Message>('messages');  

Am I perhaps missing a step in the iOS environment?

Thanks


#2

This says that the transpiled js files should be deleted.

However, I don’t know what transpiled js files to delete.

Any help please.