markushedvall / node-plantuml

A Node.js module and CLI for running PlantUML
MIT License
189 stars 53 forks source link

Java is a dependency #17

Closed aduh95 closed 4 years ago

aduh95 commented 6 years ago

Maybe I am stating the obvious here, but I think you should include a note in the README saying that Java is required in order to generate any plantuml; it's even more important than installing Graphviz, which has a note and is not even required.

I had users on my library (which depends on yours) complaining about crashing on their configuration, because java was not available on their path.

Error: spawn java ENOENT
    at _errnoException (util.js:1021:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
    at onErrorNT (internal/child_process.js:374:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
error Command failed with exit code 1.
ThaDaVos commented 5 years ago

This is still an issue - a colleague of mine didn't have it installed and the error isn't really clear - maybe catch the error and show a message that Java isn't installed instead?

markushedvall commented 4 years ago

Regarding the unclear error message it will be handled in issue https://github.com/markushedvall/node-plantuml/issues/7

An error must be thrown regardless, but the error output should be better.

aduh95 commented 4 years ago

The real issue with the current implementation is that the error is not catchable by the implementer, it crashes the whole Node process. And I agree the error could be clearer, but it's not as big as an issue IMHO.

Closing in favor of #7.