PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

Strange type issue

Open
#1,015 10 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.1k
Forks
315
Avg merge
7d 5h
Merged PRs (30d)
7

Description

Describe the bug

When type checking with tsc I get an error in this module

Expected behavior

No type issues

Current behavior

I see the following type error

node_modules/docusaurus-plugin-openapi-docs/src/types.ts:8:32 - error TS2307: Cannot find module '@docusaurus/plugin-content-docs/src/sidebars/types' or its corresponding type declarations.

8 import { SidebarItemDoc } from "@docusaurus/plugin-content-docs/src/sidebars/types";
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/docusaurus-plugin-openapi-docs/src/types.ts:24:8 - error TS2307: Cannot find module '@docusaurus/plugin-content-docs-types' or its corresponding type declarations.

24 } from "@docusaurus/plugin-content-docs-types";
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/docusaurus-plugin-openapi-docs/src/types.ts:8

Possible solution

Steps to reproduce

  1. Check out this repository
  2. cd demo
  3. yarn
  4. yarn run tsc

You will see other errors but also the ones above.

Context

I like clean types :)

Your Environment

  • Version used: 4.2.0
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): node 22
  • Operating System and version (desktop or mobile): Ubuntu
  • Link to your project: https://github.com/johnf/ro-crate-api/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with node_modules/docusaurus-plugin-openapi-docs/src/types.ts and the missing imports reported by tsc. Reproduce from the demo with yarn followed by yarn run tsc, then verify that the reported TS2307 errors for the Docusaurus type modules no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.