Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
joelngwt opened this issue Apr 9, 2021 · 5 comments · Fixed by #1572
Closed

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

joelngwt opened this issue Apr 9, 2021 · 5 comments · Fixed by #1572
Assignees

Comments

@joelngwt
Copy link

joelngwt commented Apr 9, 2021

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?

@andriyl
Copy link
Contributor

andriyl commented Apr 9, 2021

@joelngwt fixed, version: 0.11.2

@mrosales
Copy link

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.

@andriyl
Copy link
Contributor

andriyl commented Apr 13, 2021

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

@mrosales
Copy link

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?

@andriyl
Copy link
Contributor

andriyl commented Apr 14, 2021

@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants