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

better errors for plugins #640

Closed
MehdiK opened this issue Sep 11, 2013 · 5 comments
Closed

better errors for plugins #640

MehdiK opened this issue Sep 11, 2013 · 5 comments

Comments

@MehdiK
Copy link

MehdiK commented Sep 11, 2013

I just started writing a plugin and I think errors around plugin management could be improved.

I am now getting

warning: Skipped the unsupported plugin: heroku due to version-plugin

and have no idea what this means (help on this would be appreciated). Before this I set my version to 0.1 and I got this error:

/_mine/Code/mehdi-khalili.com/node_modules/docpad/node_modules/semver/semver.js:271
    throw new TypeError('Invalid Version: ' + version);
      ^
TypeError: Invalid Version: 0.1

While this one was not that hard to figure out, it could be an error logged to the console pointing out the requirements around version number instead of an unhandled exception.


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@balupton
Copy link
Member

Good feedback. For the error, plugin versions must be 2.x.x to work with DocPad v6. Will see what I can do about improving the message to explain this better.

@MehdiK
Copy link
Author

MehdiK commented Sep 11, 2013

Thanks for the quick response. That fixed it. I read the plugin docos "The reason reason why we do version 2.0.0 is just a general convention" but the word "convention" didn't make me think that's a hard rule.

Error messages aside, starting with V2.0.0 for a plugin seems a bit strange and could communicate a wrong message to the users of the plugin! Thoughts?

@nfriedly
Copy link
Contributor

nfriedly commented Nov 2, 2013

I'd like to see docpad support any version of plugins and instead check for peerDependencies - http://blog.nodejs.org/2013/02/07/peer-dependencies/

@10xLaCroixDrinker
Copy link

@nfriedly see #691

@balupton
Copy link
Member

Closing due to age. Ecosystem has likely fixed this. Try again with v6.80 or later.

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

No branches or pull requests

4 participants