Unable to run yarn build after adding plugin
See original GitHub issuePlease describe the bug you are seeing
I am unable to successfully run yarn build
after installing this plugin.
How can we best reproduce the bug?
I just followed the two steps from the instructions:
yarn add @cmfcmf/docusaurus-search-local
and adding the plugin to docusaurus.config.js
with:
require.resolve("@cmfcmf/docusaurus-search-local"),
When I run yarn build
, I get this error:
[ERROR] Unable to build website for locale en.
[ERROR] Error: docusaurus_tag meta tag not found. This is a bug and should never happen.
at getDocusaurusTag (/Users/danielkobran/Documents/ps_docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/parse.js:186:15)
at /Users/danielkobran/Documents/ps_docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:287:58
at async Promise.all (index 0)
at async Object.postBuild (/Users/danielkobran/Documents/ps_docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:283:32)
at async /Users/danielkobran/Documents/ps_docs/node_modules/@docusaurus/core/lib/commands/build.js:153:9
at async Promise.all (index 6)
at async buildLocale (/Users/danielkobran/Documents/ps_docs/node_modules/@docusaurus/core/lib/commands/build.js:149:5)
at async tryToBuildLocale (/Users/danielkobran/Documents/ps_docs/node_modules/@docusaurus/core/lib/commands/build.js:33:20)
at async mapAsyncSequencial (/Users/danielkobran/Documents/ps_docs/node_modules/@docusaurus/utils/lib/index.js:262:24)
at async build (/Users/danielkobran/Documents/ps_docs/node_modules/@docusaurus/core/lib/commands/build.js:68:25)
error Command failed with exit code 1.
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
yarn list v1.22.17 ββ @cmfcmf/docusaurus-search-local@0.10.0 ββ @docusaurus/core@2.0.0-beta.14 ββ @docusaurus/cssnano-preset@2.0.0-beta.14 ββ @docusaurus/logger@2.0.0-beta.14 ββ @docusaurus/mdx-loader@2.0.0-beta.14 ββ @docusaurus/plugin-content-blog@2.0.0-beta.14 ββ @docusaurus/plugin-content-docs@2.0.0-beta.14 ββ @docusaurus/plugin-content-pages@2.0.0-beta.14 ββ @docusaurus/plugin-debug@2.0.0-beta.14 ββ @docusaurus/plugin-google-analytics@2.0.0-beta.14 ββ @docusaurus/plugin-google-gtag@2.0.0-beta.14 ββ @docusaurus/plugin-sitemap@2.0.0-beta.14 ββ @docusaurus/preset-classic@2.0.0-beta.14 ββ @docusaurus/react-loadable@5.5.2 ββ @docusaurus/theme-classic@2.0.0-beta.14 ββ @docusaurus/theme-common@2.0.0-beta.14 ββ @docusaurus/theme-search-algolia@2.0.0-beta.14 ββ @docusaurus/theme-translations@2.0.0-beta.14 ββ @docusaurus/utils-common@2.0.0-beta.14 ββ @docusaurus/utils-validation@2.0.0-beta.14 ββ @docusaurus/utils@2.0.0-beta.14
Which Node.js version are you using?
v16.13.2
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
plugins: [
[
require.resolve("@cmfcmf/docusaurus-search-local"),
{
indexDocs: true,
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'core',
path: 'core',
routeBasePath: 'core',
sidebarPath: undefined,
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'portal',
path: 'portal',
routeBasePath: 'portal',
sidebarPath: undefined,
}
],
[
'@docusaurus/plugin-content-docs',
{
id: 'account-management',
path: 'account-management',
routeBasePath: 'account-management',
sidebarPath: 'sidebarsAccount.js',
// sidebarCollapsed: false,
}
],
]
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:12 (2 by maintainers)
Top GitHub Comments
Thank you @slorber!
As for the original issue, please make sure to wrap your custom pages in
<Layout>
from@theme/layout
, like you can see here: https://github.com/cmfcmf/docusaurus-search-local/blob/84c72c3d98c6e0d578c7799274f4a33a896c1425/packages/example-docs/src/pages/index.js#L31-L38Please let me know if you continue to encounter this issue with the latest Docusaurus beta (v2.0.0-beta.17), then Iβm happy to reopen this.
sorry missed the notification
Iβm going to restore/duplicate those tags so that nobody is affected any more
Pages will be a bit heavier but not much π€·ββοΈ not sure how to deal with this to make it convenient for most users and at the same time it doesnβt look great if you read algolia meta in third-party plugins
https://github.com/facebook/docusaurus/pull/6827