markushedvall / node-plantuml

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

node-plantuml@0.9.0 install broken (TypeError: Cannot read property 'on' of undefined) #37

Open Sarafian opened 3 years ago

Sarafian commented 3 years ago

When npm i -g node-plantuml the following error is thrown

npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
/usr/local/bin/puml -> /usr/local/lib/node_modules/node-plantuml/index.js

> node-plantuml@0.9.0 postinstall /usr/local/lib/node_modules/node-plantuml
> node scripts/get-vizjs.js

/usr/local/lib/node_modules/node-plantuml/lib/node-plantuml.js:228
  child.stdout.on('data', function (chunk) { chunks.push(chunk) })
               ^

TypeError: Cannot read property 'on' of undefined
    at Object.module.exports.testdot (/usr/local/lib/node_modules/node-plantuml/lib/node-plantuml.js:228:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-plantuml/scripts/get-vizjs.js:25:10)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623: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!     /root/.npm/_logs/2020-10-20T17_13_49_815Z-debug.log

If it helps, this a Debian WSL2 instance with fresh installed node, npm and graphviz using apt-get (Not a linux person sorry)