PaloAltoNetworks / docusaurus-openapi-docs

🦝 OpenAPI plugin for generating API reference docs in Docusaurus v3.
https://docusaurus-openapi.tryingpan.dev
MIT License
704 stars 236 forks source link

useScrollController called outside of ScrollControllerProvider in yarn PnP mode #947

Open smeng9 opened 2 months ago

smeng9 commented 2 months ago

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

  1. git clone https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs
  2. cd docusaurus-template-openapi-docs && yarn set version berry and set yarn to PnP mode by rm .yarnrc.yml or just change .yarnrc.yml's nodeLinker to pnp
  3. yarn install then add missing dependencies yarn add @docusaurus/theme-common @docusaurus/plugin-content-docs
  4. yarn docusaurus gen-api-docs all && yarn build

Screenshots

Screenshot 2024-09-05 at 1 31 58 PM

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

sserrata commented 2 months ago

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.

smeng9 commented 2 months ago

Even after removing yarn.lock file and performing a fresh install, the same issue happens during build stage in PnP mode.