markushedvall / node-plantuml

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

Install fails #33

Open Garfield2013 opened 4 years ago

Garfield2013 commented 4 years ago

On Windows 10 - and I have already installed Graphvizand added it to Windows environment system path:

npm install node-plantuml

node-plantuml@0.9.0 postinstall D:\My_project\node_modules\node-plantuml node scripts/get-vizjs.js

events.js:167 throw er; // Unhandled 'error' event ^

Error: spawn java ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19) at onErrorNT (internal/child_process.js:407:16) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:745:11) at startup (internal/bootstrap/node.js:279:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12) at onErrorNT (internal/child_process.js:407:16) [... lines matching original stack trace ...] at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-plantuml@0.9.0 postinstall: node scripts/get-vizjs.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-plantuml@0.9.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TB\AppData\Roaming\npm-cache_logs\2020-03-08T08_09_27_242Z-debug.log

shilpa-MI commented 4 years ago

Getting Same while installing node-plantuml with wondow 10

`> node-plantuml@0.9.0 postinstall C:\MI\node-api-structure-sails\node_modules\node-plantuml

node scripts/get-vizjs.js

events.js:288 throw er; // Unhandled 'error' event ^

Error: spawn java ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn java', path: 'java', spawnargs: [ '-Dplantuml.include.path=C:\MI\node-api-structure-sails\node_modules\node-plantuml', '-Djava.awt.headless=true', '-jar', 'C:\MI\node-api-structure-sails\node_modules\node-plantuml\vendor\plantuml.jar', '-testdot' ] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-plantuml@0.9.0 postinstall: node scripts/get-vizjs.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-plantuml@0.9.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Darshan\AppData\Roaming\npm-cache_logs\2020-05-18T06_06_28_396Z-debug.log `

andkirby commented 3 years ago

Getting the same... Any updates for this issue?

Behike commented 3 years ago

Same issue as #28 , where @markushedvall explained that it is because you need Java to be installed (and added to path):

This error indicate that java is not available, or maybe need to be added to PATH?

During install java is needed to run testdot in Plantuml to check the ghraphviz installation. Maybe a pure js version of testdot could be implemented instead. However, without java the package wouldn't be usable anyway.

I had the same issue on Ubuntu and installing Java resolved it, I suppose it works on Windows too

galastiaos commented 2 years ago

i got: Error: spawn set PATH= C:\Program Files\Java\jdk1.8.0_05\bin ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21)

Version: 2.9.3 OS: Windows 10.0.19043