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

Error message not output when loading a plugin #6976

Closed
corbinu opened this issue Aug 25, 2016 · 6 comments
Closed

Error message not output when loading a plugin #6976

corbinu opened this issue Aug 25, 2016 · 6 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@corbinu
Copy link
Contributor

corbinu commented Aug 25, 2016

What version of ESLint are you using?
3.3.1
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:

{
  "plugins": ["@corbinu/corbinu"]
}

What did you do? Please include the actual source code causing the issue.
I tried creating a plugin with my own config. I had an error in my plugin. However this simply displayed "ESLint couldn't find the plugin" couldn't find the plugin rather than the correct error message
What did you expect to happen?
I expected plugin-missing.txt to output the error message thrown by node.
What actually happened? Please include the actual, raw output from ESLint.

Oops! Something went wrong! :(

ESLint couldn't find the plugin "eslint-plugin-corbinu". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-corbinu is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-corbinu@latest --save-dev

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

I think the template should just be modified to include the err.message from the require try incase the issue is not the plugin not being found but instead the plugin being broken. Or this should at least be output when --debug is run

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Aug 25, 2016
@ilyavolodin ilyavolodin added enhancement This change enhances an existing feature of ESLint core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Aug 25, 2016
@ilyavolodin
Copy link
Member

I'm not sure about output error message to all users, we specifically added pretty messages, because people couldn't figure out what caused an issue. But I do agree that we should output error message as part of the --debug log. 👍

@corbinu
Copy link
Contributor Author

corbinu commented Aug 25, 2016

@ilyavolodin Well what if it was simply a different pretty message if the error wasn't that the plugin couldn't be found. The whole issue here is that I couldn't figure out the issue because I was told the plugin couldn't be found when it actually couldn't be loaded which are two very different things.

@ilyavolodin
Copy link
Member

@corbinu We could probably do a different message, but I think this is meaningful only to plugin creators (very small subset of our users). I'm definitely in favor of adding it to debug log. Separate message is fine by me, as well, but I'm not 100% sure it's necessary.

@platinumazure
Copy link
Member

👍 I think having the original exception type and string couldn't hurt, in the message or definitely in the debug logs. The fact that the full exception info isn't in the debug logs is a travesty 😢

@kaicataldo
Copy link
Member

I believe this is covered by #6874

@not-an-aardvark
Copy link
Member

This was fixed by #8323.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

No branches or pull requests

6 participants