Closed jbltx closed 1 year ago
Seems to be related to a conflict between different React versions in the mono repo. I adjusted my dependencies to use the same React version in every package and now it works. It is not ideal but at least it's a workaround.
Glad to hear it is now working. I'll close this issue then.
Please describe the bug you are seeing
After adding the plugin in the docusaurus config file, the website has crashed.
Here are the errors in the right order
Basically it think SearchBar is not a function component, the warning comes from the first
useIsBrowser()
insideThen
useIsBrowser
tries to calluseState()
from React butdispatch
isnull
at this moment. So the whole page crashes.How can we best reproduce the bug?
Not sure, I just installed the package and added the required line in the plugins section
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
Which Node.js version are you using?
18.13
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
Additional context
My Docusaurus project is part of a monorepo, managed by Lerna. I don't know if it can cause any problem.