Skip to content

Getting theme error while useing @docusaurus/preset-classic with docusaurus-plugin-openapi in plugins #248

Open
@dmonark

Description

@dmonark

I want to use @docusaurus/preset-classic in presets and docusaurus-plugin-openapi in plugins. When i'm running them getting below error

Module not found: Error: Can't resolve '@theme/ApiItem' in '/Users/dedakiya.monark/Desktop/OCEN-Documentation/.docusaurus'
Module not found: Error: Can't resolve '@theme/ApiItem' in '/Users/dedakiya.monark/Desktop/OCEN-Documentation/.docusaurus'
Module not found: Error: Can't resolve '@theme/ApiPage' in '/Users/dedakiya.monark/Desktop/OCEN-Documentation/.docusaurus'
Module not found: Error: Can't resolve '@theme/ApiPage' in '/Users/dedakiya.monark/Desktop/OCEN-Documentation/.docusaurus'
client (webpack 5.81.0) compiled with 4 errors

presents and plugins are as below

 presets: [
    [
      '@docusaurus/preset-classic',
      /** @type {import('@docusaurus/preset-classic').Options} */
      ({
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
          // Please change this to your repo.
          // Remove this to remove the "edit this page" links.
          editUrl:
            'https://github.com/',
        },
        blog: {
          showReadingTime: true,
          // Please change this to your repo.
          // Remove this to remove the "edit this page" links.
          editUrl:
            'https://github.com/',
        },
        theme: {
          customCss: require.resolve('./src/css/custom.css'),
        },
      }),
    ]
  ],
  plugins: [
    [
      "docusaurus-plugin-openapi",
      {
        id: "multi-spec",
        path: "apis",
        routeBasePath: "apis",
      },
    ],
  ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions