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

Custom plantuml jar is relative to the installed plugin not the project #30

Open
kornysietsma opened this issue Sep 3, 2021 · 1 comment

Comments

@kornysietsma
Copy link
Contributor

kornysietsma commented Sep 3, 2021

In versions before 0.6.0 you could specify a relative path for the jar file:plantumljar: "plantuml/plantuml.1.2020.17.jar"

In version 0.7.0 the path is resolved relative to the plugin's path, e.g. node_modules/gatsby-remark-plantuml so if you want a relative jar file you need to specify it as:

  plantumljar: "../../plantuml/plantuml.1.2020.17.jar"

It would be good if this were either documented, or changed to make it relative to the project itself - gatsby only gives a very unhelpful error message, so it's quite hard to work out why this isn't working.

The issue seems to be in the path.resolve call, which now is relative to __dirname

@baerrach
Copy link
Owner

baerrach commented Sep 6, 2021

This was done as part of 93bc546

The tests indicate there should be an error, which I note is clearly a developer local path... not what I'd normally consider suitable...

           `Error: Unable to access jarfile C:\\ide\\gatsby-remark-plantuml\\lib\\plantuml-does-not-exist.jar\r\n`

Are you not seeing similar errors in your output to indicate the path of the jarfile?

I don't know why __dirname was added, I haven't written any notes on that... oops.

As I'm the maintainer, I don't use the relative option, I just upgrade plantuml.

If you are using this option, can you work out what make sense?
Either relative to the gatsby project, or relative to the node module.
And then provide a contribution? with documentation

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

No branches or pull requests

2 participants