Comments (5)
What's the error report? Try the following command to get more detailed report:
DEBUG=search-local:* npm run build
or
DEBUG=search-local:* yarn build
from docusaurus-search-local.
What's the error report? Try the following command to get more detailed report:
DEBUG=search-local:* npm run build
or
DEBUG=search-local:* yarn build
Set language: ["en"]
i18n: {
defaultLocale: 'en-US',
locales: [
'en-US',
'de-DE',
'es-ES',
'fr-FR',
'ja-JP',
'nn-NO',
'pt-PT',
'ru-RU',
'tr-TR',
'uk-UA',
'zh-CN',
'zh-TW'
],
localeConfigs: {
'en-US': {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US'
},
themes: [
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh","de","es","fr","ja","pt","ru","tr"],
language: ["en"],
// ```
},
],
],
[ERROR] Error: Unable to build website for locale en-US.
at tryToBuildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:53:19)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at async mapAsyncSequential (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
at async Command.build (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
[cause]: Error: Docusaurus static site generation failed for 2 paths:
- "/404.html"
- "/search"
at generateStaticFiles (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/ssg.js:85:15)
at async executeSSG (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:146:23)
... 4 lines matching cause stack trace ...
at async Command.build (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
[cause]: AggregateError
at generateStaticFiles (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/ssg.js:86:20)
at async executeSSG (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:146:23)
at async buildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:126:31)
at async tryToBuildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:46:13)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at async mapAsyncSequential (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
at async Command.build (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
[errors]: [
Error: Can't render static file for pathname "/404.html"
at generateStaticFile (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processImmediate (node:internal/timers:449:9)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/p-map/index.js:57:22 {
[cause]: Error: You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled (pluginId=default
at useDocsData (server.bundle.js:13696:238)
at useDocsPreferredVersion (server.bundle.js:16100:233)
... 6 lines matching cause stack trace ...
at Z (server.bundle.js:25644:89)
at Xc (server.bundle.js:25638:481) {
[cause]: Error: Docusaurus plugin global data not found for "docusaurus-plugin-content-docs" plugin with id "default".
at usePluginData (server.bundle.js:13671:663)
at useDocsData (server.bundle.js:13696:145)
at useDocsPreferredVersion (server.bundle.js:16100:233)
at SearchBar (server.bundle.js:15489:81)
at Uc (server.bundle.js:25636:44)
at Xc (server.bundle.js:25638:253)
at Z (server.bundle.js:25644:89)
at Yc (server.bundle.js:25647:98)
at Xc (server.bundle.js:25639:145)
at Z (server.bundle.js:25644:89)
}
},
Error: Can't render static file for pathname "/search"
at generateStaticFile (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processImmediate (node:internal/timers:449:9)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/p-map/index.js:57:22 {
[cause]: Error: You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled (pluginId=default
at useDocsData (server.bundle.js:13696:238)
at useDocsPreferredVersion (server.bundle.js:16100:233)
... 6 lines matching cause stack trace ...
at Z (server.bundle.js:25644:89)
at Xc (server.bundle.js:25638:481) {
[cause]: Error: Docusaurus plugin global data not found for "docusaurus-plugin-content-docs" plugin with id "default".
at usePluginData (server.bundle.js:13671:663)
at useDocsData (server.bundle.js:13696:145)
at useDocsPreferredVersion (server.bundle.js:16100:233)
at SearchBar (server.bundle.js:15489:81)
at Uc (server.bundle.js:25636:44)
at Xc (server.bundle.js:25638:253)
at Z (server.bundle.js:25644:89)
at Yc (server.bundle.js:25647:98)
at Xc (server.bundle.js:25639:145)
at Z (server.bundle.js:25644:89)
}
}
]
}
}
}
[INFO] Docusaurus version: 3.3.2
Node version: v20.11.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Set language: ["en-US"]
i18n: {
defaultLocale: 'en-US',
locales: [
'en-US',
'de-DE',
'es-ES',
'fr-FR',
'ja-JP',
'nn-NO',
'pt-PT',
'ru-RU',
'tr-TR',
'uk-UA',
'zh-CN',
'zh-TW'
],
localeConfigs: {
'en-US': {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US'
},
themes: [
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh","de","es","fr","ja","pt","ru","tr"],
language: ["en-US"],
// ```
},
],
],
[INFO] [en-US] Creating an optimized production build...
[ERROR] Error: Unable to build website for locale en-US.
at tryToBuildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:53:19)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at async mapAsyncSequential (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
at async Command.build (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
[cause]: Error: Cannot find module 'lunr-languages/lunr.zh-CN'
Require stack:
- /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/generate.js
- /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js
- /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/moduleUtils.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Function.resolve (node:internal/modules/helpers:187:19)
at generate (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/generate.js:21:57)
at Object.DocusaurusSearchLocalPlugin [as plugin] (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js:17:57)
at initializePlugin (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/server/plugins/init.js:83:61)
at async Promise.all (index 9)
at async initPlugins (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/server/plugins/init.js:91:21)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/server/plugins/plugins.js:136:36
at async loadSite (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/server/site.js:127:45)
at async buildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:105:18)
at async tryToBuildLocale (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:46:13)
at async /Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at async mapAsyncSequential (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
at async Command.build (/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/generate.js',
'/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js',
'/Users/zyk/www/PP/Domain/platform/pp_docs/node_modules/@docusaurus/utils/lib/moduleUtils.js'
]
}
}
from docusaurus-search-local.
I'm having the same issue
from docusaurus-search-local.
Are you using customized plugin id for "@docusaurus/plugin-content-docs" like:
plugins: [
[
"@docusaurus/plugin-content-docs",
{
id: "community",
// ...
}
]
]
If so, you should specify docsPluginIdForPreferredVersion
according to our README.
from docusaurus-search-local.
I fixed this issue yesterday, it may be that the link inside your markdown file is incorrect. For example, "[readme] (./readme)" but actually "../readme".
from docusaurus-search-local.
Related Issues (20)
- Search By Keywords matches multiple keywords as a single string HOT 1
- Duplicate URLs for search results HOT 2
- Going to search results on headings seems to add the path twice HOT 1
- Issues with RTL languages HOT 7
- Contextual results are missing their context description HOT 3
- Insufficient contrast on highlighted suggestion HOT 5
- Customize search bar board colour HOT 1
- Support queryString in URL when result is in a Tab HOT 1
- How many pages or size of content can this lib handle? HOT 1
- Option to affect search result order/prioritization HOT 3
- Include headers from h4 and beyond in the search index as tokens
- Error occurs when building after adding "hi" or "th" to language prop HOT 3
- Search Bar Generating Incorrect URLs with Duplicated Paths in Multi-Instance Setup HOT 2
- Want a support to make docusaurus tags searchable
- Build fail on Docusaurus 3.5.1 HOT 7
- Module not found: Error: Can't resolve '@docusaurus/useIsomorphicLayoutEffect' on docusaurus 2.4.1
- Build Issue with Hash Router HOT 1
- 文档突然无法编译
- Module not found: Error: Can't resolve '@generated/site-storage'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-search-local.