Closed vixducis closed 1 year ago
You can downgrade to 0.11.0
until the issue is fixed.
The weird thing is that this is only happening with the node windows executable (v18.15.0), when I use node inside my WSL (v16.17.1), there doesn't seem to be an issue.
Thanks a lot for providing this additional insight! It turns out that the issue was Windows-specific - the d-s-l-a-generated.js
file should have been generated with Webpack here: https://github.com/cmfcmf/docusaurus-search-local/blob/e0baecf85cf4a0ec838e5e5a673d3f5f2fc3b34d/packages/docusaurus-search-local/src/server/index.ts#L598
However, I didn't realize that Webpack's rules.test
option doesn't normalize backslashes and slashes, and so the file wasn't created on Windows.
I fixed this in https://github.com/cmfcmf/docusaurus-search-local/pull/180 and will release a new version with this fix shortly.
Truly awesome, man!
Please describe the bug you are seeing
When running the dev server, I get the above error. I was able to trace this down to
@cmfcmf\docusaurus-search-local\lib\client\theme\SearchBar\index.js
, where on several occasionsmylunr
is accessed.It is imported on the following line:
./d-s-l-a-generated
just containsexport {};
however, which explains the failing imports. The weird thing is that this is only happening with the node windows executable (v18.15.0), when I use node inside my WSL (v16.17.1), there doesn't seem to be an issue.How can we best reproduce the bug?
No response
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
"@docusaurus/core": "2.4.0" "@cmfcmf/docusaurus-search-local": "1.0.0"
Which Node.js version are you using?
v18.15.0
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
Additional context
No response