markushedvall / node-plantuml

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

Need to manually install the safe-buffer dependency #22

Closed stijnherreman closed 5 years ago

stijnherreman commented 6 years ago

I need to run npm install safe-buffer --save-dev, otherwise when using const plantuml = require("node-plantuml"); I get the following error:

module.js:549
    throw err;
    ^

Error: Cannot find module 'safe-buffer'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\redacted\node_modules\node-plantuml\lib\node-plantuml.js:9:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
markushedvall commented 6 years ago

Not sure why that's happening since safe-buffer is listed as a dependency in 0.6.2.

Either way, in master safe-buffer is not used anymore and won't be needed in the next release (which should be published soon).

Thanks for reporting!