cloud-annotations / docusaurus-openapi

🦕 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
509 stars 83 forks source link

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

Open dmonark opened 1 year ago

dmonark commented 1 year ago

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",
      },
    ],
  ]
filipamb commented 1 year ago

Same problem here. Any idea how to fix that?

chenzhenjia commented 1 year ago

me too