Meteor:Ionic服务于Windows vs OSx [英] Meteor: Ionic serve on Windows vs OSx

查看:107
本文介绍了Meteor:Ionic服务于Windows vs OSx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Ionic 2 Meteor 。我在 Windows 中构建了一个应用程序,它在 Android 平台上运行完美。

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

我现在有 OSx ,我正在尝试为 iOS 构建应用程序。我已成功安装 npm cordova

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

ionic platform add ios

但是当我跑步时:

ionic serve

我在CLI中没有错误,但当我尝试在Firefox中访问应用程序时:

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

localhost:8100

Firebug控制台报告以下错误:

The Firebug console reports the following error:

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

中不会发生此错误Android / Windows 环境。

代码

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');  

我可能错过了 iOS 环境?

谢谢

更新

我在Windows上构建应用程序,它运行得很好。现在我试图让它在OSx上运行,我遇到了上述问题。正如您所看到的,我的版本并不完全相同。我这可能是问题?

I build the app on Windows, where it runs perfectly. Now I am trying to get it to run on OSx where I have the above problems. As you can see my versions are not exactly the same. I this maybe the problem?

Windows:


Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
OS:
Node Version: v6.2.2


OSx:


Your system information:

Cordova CLI:  You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.4.0

Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: OS X El Capitan
Node Version: v6.9.1
Xcode version: Not installed



推荐答案

如果您在IOS环境中使用相同的项目,则可能需要删除旧的transiled js / .map files
点击此链接: https:// github。 com / Urigo / angular2-meteor / issues / 318

If you are using the same project in IOS environment, you may need to delete the old transpiled js/.map files Check this link: https://github.com/Urigo/angular2-meteor/issues/318

这篇关于Meteor:Ionic服务于Windows vs OSx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆