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

[Bug] 2.0.0-beta.19 and 2.0.0-beta.20 Breaking Changes #79

Closed
1 of 2 tasks
sserrata opened this issue May 9, 2022 · 4 comments
Closed
1 of 2 tasks

[Bug] 2.0.0-beta.19 and 2.0.0-beta.20 Breaking Changes #79

sserrata opened this issue May 9, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sserrata
Copy link
Member

sserrata commented May 9, 2022

Describe the bug

Docusaurus 2.0.0-beta.19 and 2.0.0-beta.20 introduced breaking changes preventing us from upgrading from 2.0.0-beta.18. This issue will be used for both bug and progress tracking as we work through the issues.

Expected behavior

There should be a viable upgrade path moving from 2.0.0-beta.18 to beta.19 or beta.20.

Current behavior

Currently, we're able to run beta.19 and beta.20 in dev server only - production builds are not possible. The errors suggest possible issue with legacy or incompatible module exports in docusaurus-theme-openapi-docs.

Progress

@sserrata
Copy link
Member Author

sserrata commented May 9, 2022

Target release: 2.0.0-beta.20

Note: beta.19 removed support for FrontMatter type. Refactored ApiItem to use DocFrontMatter type instead, copied over from https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts#L260.

  • ✅ Dev server
  • ❌ Production Build

Stack trace:

TypeError: chalk_1.default.bold is not a function
TypeError: chalk_1.default.bold is not a function
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.
    at /Users/sserrata/projects/panw/docusaurus-openapi/node_modules/@docusaurus/core/lib/webpack/utils.js:182:24
    at /Users/sserrata/projects/panw/docusaurus-openapi/node_modules/webpack/lib/MultiCompiler.js:554:14
    at processQueueWorker (/Users/sserrata/projects/panw/docusaurus-openapi/node_modules/webpack/lib/MultiCompiler.js:491:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/Cellar/node/17.4.0/bin/node
Arguments: /usr/local/lib/node_modules/yarn/lib/cli.js build
Directory: /Users/sserrata/projects/panw/docusaurus-openapi/demo
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@sserrata
Copy link
Member Author

Decided it wouldn't hurt to review and remediate all @ts-ignore usage throughout the project, that could otherwise be masking underlying problems. See #80 for details.

@sserrata
Copy link
Member Author

Issue reported here: facebook/docusaurus#7398

@sserrata
Copy link
Member Author

Able to build successfully after facebook/docusaurus#7453 was merged

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

3 participants