2016-11-22 2 views
0

Ionic2プロジェクトでMeteorを使用する際に問題があります。それは流星-チュートリアルのクローンであるとして プロジェクト自体は、実行する必要があります: git clone https://github.com/Urigo/Ionic2CLI-Meteor-WhatsAppIonic2 with Meteor

を私はこの

=> Started proxy.        
server/publications.ts (24, 10): Property 'publishComposite' does not exist on type 'typeof Meteor'. 
server/main.ts (14, 28): Property '_options' does not exist on type 'typeof Accounts'. 
server/main.ts (51, 14): Property 'createUserWithPhone' does not exist on type 'typeof Accounts'. 
=> Started MongoDB.       
=> Started your app.       

=> App running at: http://localhost:3000/ 

を取得流星サーバーを起動するとその後、私はionic serveとイオンアプリを起動してもらいますこの端末内に

Running live reload server: http://localhost:35729 
Watching: www/**/*, !www/lib/**/*, !www/**/*.map 
√ Running dev server: http://localhost:8100 

私はアプリを開くと、私は、ブラウザのコンソールにこのエラーが表示されます。

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8100/sockjs/info?cb=_07sz35uj7 

私が理解しているように、それは流星からデータを取得しようとしていますが、到達できませんでした。ブラウザでURLを手動で開き、ポートを3000に変更すると、流星からメッセージが返されます。

は、私はGoogleの上の2つのヒントが見つかりました:

1))livereloadなし ionic serve --nolivereload

2をイオンアプリを起動し、正しいURL:PORT

__meteor_runtime_config__を設定する。しかし、ヒント1にはありませんヒント2についてはどこに置くべきかわかりません。

これを書いている間、私は、ファイルnode_modules/meteor-client-side/meteor-runtime-config.jsに正しいポートがヒント2もすでに行われているようなので、それが見えます

__meteor_runtime_config__ = {}; 
__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = 'http://localhost:3000'; 

によって定義されていること、がわかりました。 それはまだ間違ったポートで流星のサーバーに到達しようとしているのですか、それとも別の問題がありますか?

答えて

0

もう一度自分で解決してください。 node_modules/meteor-client-side/meteor-runtime-config.jsファイル内の設定は無視されている理由

<script> 
    __meteor_runtime_config__ = { 
     DDP_DEFAULT_CONNECTION_URL: 'http://localhost:3000' 
    }; 
</script> 

ノーアイデア、: 私は私ionic2プロジェクトのindex.htmlファイルにコードのこれらの行を追加する必要がありました。

編集:バージョン1.3.5 https://github.com/idanwe/meteor-client-side/issues/28#issuecomment-263252756

に固定されているバグがありましたようにが見えます