docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
useScrollController called outside of ScrollControllerProvider in yarn PnP mode
Describe the bug
Building the Template Repository project throws useScrollController called outside of ScrollControllerProvider
Expected behavior
The Template Repository should be built without a problem.
Current behavior
I can't build the Template Repository in my project setup.
Possible solution
I guess it is some dependency issue but not sure.
Steps to reproduce
git clone https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docscd docusaurus-template-openapi-docs && yarn set version berryand set yarn to PnP mode byrm .yarnrc.ymlor just change .yarnrc.yml's nodeLinker to pnpyarn installthen add missing dependenciesyarn add @docusaurus/theme-common @docusaurus/plugin-content-docsyarn docusaurus gen-api-docs all && yarn build
Screenshots
Context
I am not able to build the project using yarn PnP mode. I can still build the project using nodeLinker: node-modules in .yarnrc.yml . However that will take more space to store the package dependencies during development and CI release.
Your Environment
- Version used: Docusaurus OpenAPI Docs 4.0.1, Docusaurus 3.5.2
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): Safari 17.5, node.js 20.10.0, yarn 4.4.1
- Operating System and version (desktop or mobile): desktop macOS Sonoma 14.5
- Link to your project: https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs
Hi @smeng9, I don't use pnp so not too familiar with the issue you're encountering. That said, I removed the yarn.lock file from the template just in case it was causing any conflicts.
Even after removing yarn.lock file and performing a fresh install, the same issue happens during build stage in PnP mode.
Fixed in https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1019 after moving @docusaurus/theme-common to peerDependencies to deduplicate the package