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

Plugin import error is misleading #1091

Closed
RomanHotsiy opened this issue May 22, 2023 · 1 comment · Fixed by #1100
Closed

Plugin import error is misleading #1091

RomanHotsiy opened this issue May 22, 2023 · 1 comment · Fixed by #1100
Assignees
Labels
p2 Type: Bug Something isn't working

Comments

@RomanHotsiy
Copy link
Member

RomanHotsiy commented May 22, 2023

Describe the bug
If the plugin fails to import the error is misleading, it always shows: "Please provide a valid path"

throw new Error(`Failed to load plugin "${plugin}". Please provide a valid path`);

To Reproduce

  • Create a plugin with a syntax error.
  • Provide valid path to a plugin in redocly.yaml
  • See the errors says Please provide a valid path

Expected behavior
Should show original import error.

@RomanHotsiy RomanHotsiy added Type: Bug Something isn't working p2 labels May 22, 2023
@lornajane
Copy link
Collaborator

Thanks for logging this, I've definitely run into it before!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants