Josh McGee
Josh McGee

Reputation: 552

why do I get "index is not defined" error using easy:search

I'm just trying to set up a basic search tool in Meteor to find articles in my MongoDB collection, but I'm struggling to get off the ground (if anyone has a good tutorial for an alternative search tool I'm open to suggestions).

I've settled on easy:search because it seemed like a simple search tool to get running, however one paragraph into their getting started instructions and I'm already getting an error:

ReferenceError: Index is not defined

although correct me if I'm wrong, but isn't that what the

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

line is for?

EDIT: I have tried using the import line on both the client and the server side and I get the same error either way

Upvotes: 0

Views: 521

Answers (2)

Josh McGee
Josh McGee

Reputation: 552

this problem was fixed when I included the "import" line in the "lib" folder along with the other code (specified here) to be run on both server and client

disclaimer: I uninstalled and reinstalled meteor and may have changed something else along the way which may have been the true solution, but this appears to be the triggering change

Upvotes: 0

Danilo Miranda
Danilo Miranda

Reputation: 111

Did you install the package on meteor?

 meteor add matteodem:easy-search

I see that in the getting start instructions they didn't put the instruction.

See ya

Upvotes: 0

Related Questions