Closed matthew-west-unity closed 1 year ago
I'm also facing the same issue .
Have the same issue.
same issue here.
Thank you all for letting me know; I will take a look as soon as possible.
Have the same issue.
TypeError: (0 , d_s_l_a_generated_namespaceObject.mylunr) is not a function
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"1:1172-1178","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"1:2112-2129","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"21:553-561","message":"export 'tokenize' (imported as 'tokenize') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"21:832-862","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"21:988-1018","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"21:1132-1162","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"21:1374-1404","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"1:859-865","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"5:58-75","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"26:236-244","message":"export 'tokenize' (imported as 'tokenize') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"26:431-461","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"26:587-617","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"26:731-761","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[WARNING] {"moduleIdentifier":"d:\\www\\YetiForceDoc\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[6].use[0]!d:\\www\\YetiForceDoc\\node_modules\\@cmfcmf\\docusaurus-search-local\\lib\\client\\theme\\SearchBar\\index.js","moduleName":"./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/index.js","loc":"26:973-1003","message":"export 'mylunr' (imported as 'mylunr') was not found in './d-s-l-a-generated' (module has no exports)","compilerPath":"server"}
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.
at d:\www\YetiForceDoc\node_modules\@docusaurus\core\lib\webpack\utils.js:180:24
at d:\www\YetiForceDoc\node_modules\webpack\lib\MultiCompiler.js:554:14
at processQueueWorker (d:\www\YetiForceDoc\node_modules\webpack\lib\MultiCompiler.js:491:6)
at processTicksAndRejections (node:internal/process/task_queues:78:11)
[INFO] Docusaurus version: 2.4.0
Node version: v16.17.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Thank you all for reporting this and apologies for the delay! 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.
Please describe the bug you are seeing
I've started a new Docusaurus project and when I run
docusaurus build
with version 1.0.0 of thedocusaurus-search-local
plugin it fails with the following error:TypeError: (0 , d_s_l_a_generated_namespaceObject.mylunr) is not a function
And the stack trace:
If I use
0.11.0
of this package the build completes successfully.How can we best reproduce the bug?
No response
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
Which Node.js version are you using?
v16.16.0
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
Additional context
No response