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: Can't resolve 'lunr' with yarn #128

Closed
vitonsky opened this issue Dec 5, 2023 · 0 comments · Fixed by #129
Closed

Error: Can't resolve 'lunr' with yarn #128

vitonsky opened this issue Dec 5, 2023 · 0 comments · Fixed by #129

Comments

@vitonsky
Copy link
Contributor

vitonsky commented Dec 5, 2023

Hi, thanks for search solution, i found bug - when i've tried to use this package with yarn, i've got error below

image

Explanation

As i understood, the problem is when i use plugin as described in docs

module.exports = {
  // ...
    plugins: [require.resolve('docusaurus-lunr-search')],
}

yarn do not handle it as import, so don't install transitive dependencies (which lunr is).

I can resolve this problem if i will just install dependency explicitly with yarn add -D lunr

Proposal

Let's improve install instructions, to not confuse another developers with this problem. I propose to mention that to use package docusaurus-lunr-search we have to install lunr

We can just fix text in section "How to Use ?" to npm i docusaurus-lunr-search lunr --save

vitonsky added a commit to vitonsky/docusaurus-lunr-search that referenced this issue Dec 6, 2023
praveenn77 added a commit that referenced this issue Dec 9, 2023
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

Successfully merging a pull request may close this issue.

1 participant