Giter Site home page Giter Site logo

Comments (8)

rohit-gohri avatar rohit-gohri commented on July 28, 2024 1

So, this turned out to be an error in redoc: Redocly/redoc#1575

I updated the yarn.lock in your repo and it's now working.

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024 1

@drichards-87 I just upgraded redoc. If you are using webpack 5 then this might be the fix: Redocly/redoc#1584 (comment)

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024

And my Docusaurus.config.js redocusaurus field is:

    [
      'redocusaurus',
      {
        specs: [{
    spec: 'specs/api',
    routePath: path //this is an actual absolute path that I get with fs.resolve
}],

Just to be clear, spec here need to point to a OpenAPI yaml file and routePath is the route you want the docs to show up on the website, for eg. /docs/api/v1/.

You can see all the different option types in the example config: https://github.com/rohit-gohri/redocusaurus/blob/main/example/docusaurus.config.js

If the options are correct, would it be possible for you to share the open api file so I can test on local? You can also email me instead of making it public.

from redocusaurus.

rubfergor avatar rubfergor commented on July 28, 2024

@rohit-gohri I can share a repro privately if you want, just let me know if it is ok to add you to the private repo I made so you can reproduce the issue (nothing really confidential as it is docs for a public API, but I prefer not to share it if I can avoid it just in case it breach some company privacy policy to share any kind of code publicly)

Also, I tried with what you said but the result is the same :(

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024

That would be great

from redocusaurus.

rubfergor avatar rubfergor commented on July 28, 2024

Done, let me know if I can help somehow!

from redocusaurus.

drichards-87 avatar drichards-87 commented on July 28, 2024

@rohit-gohri Could you share what you did to fix this issue? I'm encountering the same error...

from redocusaurus.

maheshmnj avatar maheshmnj commented on July 28, 2024

Not sure who needs to see this, I spent couple of hours debugging the project and found that this issue was due to one of the imports in my docusaurus project

import siteConfig from '../../../docusaurus.config'; Removing this import fixed the issue

In my project, I was using customFields and imported docusaurus.config.js as below

import siteConfig from '../../../docusaurus.config';

...
export default function FeaturedList(props) {
    var localPosts = siteConfig.customFields.allPosts;

and fixed it by using useDocusaurusContext

import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

....
export default function FeaturedList(props) {
    const { siteConfig } = useDocusaurusContext();

from redocusaurus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.