node-plantuml
node-plantuml copied to clipboard
Install fails
On Windows 10 - and I have already installed Graphviz
and added it to Windows environment system path:
npm install node-plantuml
[email protected] 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! [email protected] postinstall: node scripts/get-vizjs.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Getting Same while installing node-plantuml
with wondow 10
`> [email protected] 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! [email protected] postinstall: node scripts/get-vizjs.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 `
Getting the same... Any updates for this issue?
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
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