Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when initializing lunr.th.js #101

Open
jinyoungbang opened this issue Jul 13, 2023 · 1 comment
Open

Error when initializing lunr.th.js #101

jinyoungbang opened this issue Jul 13, 2023 · 1 comment

Comments

@jinyoungbang
Copy link

When initializing lunr.th.js, the following error occurs: TypeError: Cannot read properties of undefined (reading 'init').

This seems to be happening to languages that try to use wordcut.js, where the error occurs as the init() function gets called, as shown in this block:

var segmenter = lunr.wordcut;
segmenter.init();

Personally, I think that the wordcut.js is not getting imported into the respective languages and with absolute import, no error seems to occur:

lunr.wordcut = require('./wordcut');
var segmenter = lunr.wordcut;
segmenter.init();

Would love to get some advice or feedback if this would be the right approach to solve the issue!

@rennerg
Copy link

rennerg commented Oct 24, 2023

I'm having the same problem with lunr.hi.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants