Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusuarus V2 Fails to build when using Docusaurus Search Local #83

Closed
astrawnuts opened this issue Dec 11, 2021 · 2 comments
Closed

Docusuarus V2 Fails to build when using Docusaurus Search Local #83

astrawnuts opened this issue Dec 11, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@astrawnuts
Copy link

Bug description

Reproduction

Public Repo Link: https://github.com/astrawnuts/Docusaurus-NEW-Local-Search

Just to prove that docusaurus search local was the cause of the failed project build I setup a new docusaurus website using the create command for V2 Beta 13 and installed docusaurus search local. Changed the docusaurus config file and tried to build.

The following error was shown

$ DEBUG=1 yarn build
yarn run v1.22.15
warning ..\package.json: No license field
$ docusaurus build

[en] Creating an optimized production build...
Unable to build website for locale "en".
TypeError: (0 , utils_1.readDefaultCodeTranslationMessages) is not a function
    at Object.getDefaultCodeTranslationMessages (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@cmfcmf\docusaurus-search-local\lib\server\index.js:148:97)
    at S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\server\translations\translations.js:174:186
    at Array.map (<anonymous>)
    at getPluginsDefaultCodeTranslationMessages (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\server\translations\translations.js:174:55)
    at load (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\server\index.js:240:79)
    at async buildLocale (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\commands\build.js:82:19)
    at async tryToBuildLocale (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\commands\build.js:34:20)
    at async mapAsyncSequencial (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\utils\lib\index.js:262:24)
    at async build (S:\Files\VS_Code\Projects\docs_v3\my-website\node_modules\@docusaurus\core\lib\commands\build.js:70:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

If possible, provide a link to the source of your documentation or at least
the document/page this issue is about (if applicable). If this bug report is
about a failure that occurs while building your documentation, please find out
which document breaks the build process by building your documentation with debug
information enabled as described in the README (DEBUG=1 yarn build). If you can,
provide the document that breaks the build process as indicated by the debug messages.

Environment

Package Versions

If you use Yarn:
yarn list --pattern '@docusaurus|@cmfcmf' --depth=0
If you use npm:
npm list '@docusaurus/core' '@cmfcmf/docusaurus-search-local'

$  yarn list --pattern '@docusaurus|@cmfcmf' --depth=0
yarn list v1.22.15
warning ..\package.json: No license field
├─ @cmfcmf/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
├─ @docusaurus/[email protected]
└─ @docusaurus/[email protected]
Done in 0.88s.

Node Version

node -v

$ node -v v16.13.0

Docusaurus Environment

  • Are you using a custom theme?
  • Paste the plugin config of the local search plugin from your docusaurus.config.js file

Additional context

@astrawnuts astrawnuts added the bug Something isn't working label Dec 11, 2021
@astrawnuts
Copy link
Author

Update #2:
Same bug occurs on my other github repo using Docusaurus and local search plugin

cmfcmf added a commit that referenced this issue Dec 11, 2021
cmfcmf added a commit that referenced this issue Dec 11, 2021
BREAKING CHANGE: the minimum supported Docusaurus version is now v2.0.0-beta9.

Fixes #82
Fixes #83
@cmfcmf cmfcmf closed this as completed in e74750f Dec 11, 2021
@cmfcmf
Copy link
Owner

cmfcmf commented Dec 11, 2021

Thank you for reporting this. Should be fixed in v0.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants