Skip to content

Relative paths in redoc-cli bundle broken in v0.11 #1571

Closed

Description

@joelngwt

Hi, there seems to be a bug with the latest redoc-cli version (0.11).

The command I usually use:

sudo npm install -g redoc-cli
redoc-cli bundle ./docs/openapi/task-management.yaml --options.hideDownloadButton

Result:

+ redoc-cli@0.11.1
added 279 packages from 258 contributors in 10.282s
Error: ENOENT: no such file or directory, open '/docs/openapi/task-management.yaml'
    at BaseResolver.<anonymous> (/usr/local/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:102:23)
    at Generator.throw (<anonymous>)
    at rejected (/usr/local/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:6:65)

Somehow it's trying to open an absolute path?

There's no issue in v0.10.4. Is there a new way to send relative paths to the cli?

Activity

  1. andriyl commented on Apr 9, 2021

    @andriyl
    Contributor

    @joelngwt fixed, version: 0.11.2

  2. mrosales commented on Apr 13, 2021

    @mrosales

    I'm still having this issue in 0.11.2 😞

    yarn redoc-cli --version
    $ /path/to/project/node_modules/.bin/redoc-cli --version
    0.11.2
    
    yarn redoc-cli bundle ./openapi.yaml
    $ /path/to/project/node_modules/.bin/redoc-cli bundle ./openapi.yaml
    Error: ENOENT: no such file or directory, open '/openapi.yaml'
        at BaseResolver.<anonymous> (/path/to/project/node_modules/@redocly/openapi-core/lib/resolve.js:102:23)
        at Generator.throw (<anonymous>)
        at rejected (/path/to/project/node_modules/@redocly/openapi-core/lib/resolve.js:6:65)
    error Command failed with exit code 1.
    
  3. andriyl commented on Apr 13, 2021

    @andriyl
    Contributor

    @mrosales please try the latest version: v0.11.4 and let me know if it works for you.

  4. mrosales commented on Apr 13, 2021

    @mrosales

    Hmm it seemed to be fixed with an uninstall + reinstall even on 0.11.2. Maybe the update was in openapi-core which didn't get updated because of my yarn config?

  5. andriyl commented on Apr 14, 2021

    @andriyl
    Contributor

    @mrosales hope not, but it's good that works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions