2017-11-03 6 views
0

私は現在このガイドを使って天気を簡単に検索しています。簡単検索でエラーが発生しました:MinimongoEngine

http://matteodem.github.io/meteor-easy-search/

これは、次のようなエラーが発生します。

TypeError: MinimongoEngine is not a constructor 

これは私が検索実装しています方法です:インストール

パッケージ:

matteodem:easy-search 
easy:search 
easysearch:components 
easysearch:core 

クライアント/検索ボックスを.html

<template name="searchBox"> 
    {{> EasySearch.Input index=playersIndex }} 
    <ul> 
     {{#EasySearch.Each index=playersIndex }} 
      <li>Name of the player: {{name}}</li> 
     {{/EasySearch.Each}} 
    </ul> 
</template> 

クライアント/ searchBox.js

// On Client 
Template.searchBox.helpers({ 
    playersIndex:() => PlayersIndex, 
}) 

のlib/collection.js

import { Index, MinimongoEngine } from 'meteor/easy:search' 

// On Client and Server 
const Players = new Mongo.Collection('players') 
const PlayersIndex = new Index({ 
    collection: Players, 
    fields: ['name'], 
    engine: new MinimongoEngine() 
}) 

それを解決する方法のいくつかのアイデア、私は流星に新たなんだ、ので、任意の助けは次のようになります感謝。私が何か間違っていると助けてください。

答えて

0

MinimongoEngineの代わりにcodeMongoDBEngineが使用されています。

パッケージソースを見ると、MinimongoEngineMongoDBEngineの両方がエクスポートされているようです。クライアント上にMinimongoEngine、サーバコンテキストにMongoDBEngineが必要なのでしょうか?サーバーコンソールまたはブラウザのコンソールにそのタイプのエラーが表示されていますか?

関連する問題