tentenponce / KoinGraph

Graph generator for android projects using Koin
MIT License
15 stars 1 forks source link

Can't find koin-graph.js #15

Open fmatosqg opened 4 years ago

fmatosqg commented 4 years ago

Installed as shown in instructions sudo npm install -g koingraph

Unfortunately I'm useless when it comes to js so I'm not able to debug it.

> koingraph --path app/
Reading Project...
Project Loaded
Reading Koin Dependencies...
Success building Koin dependencies
? Now, what graph do you want to render? Tree Graph
(node:17509) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/koingraph/ui/tree/koin-graph.js'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1299:33)
    at inquirer.prompt.then.answers (/usr/local/lib/node_modules/koingraph/index.js:50:10)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:17509) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17509) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I could verify though that such file does not exist:

> ls /usr/local/lib/node_modules/koingraph/ui/tree/
tree-graph.html  TreeGraphMapper.js
tentenponce commented 4 years ago

Hi @fmatosqg, sorry for the late reply. What OS are you using? If Windows, try to run as administrator the command prompt. If Linux, try to add sudo before your command.

fmatosqg commented 4 years ago

With all due respect, doing sudo is a huge risk and shouldn't be necessary for running a user script. There must be another way.

On Fri., 6 Dec. 2019, 11:57 Tenten Ponce, notifications@github.com wrote:

What OS are you using? If Windows, try to run as administrator the command prompt. If Linux, try to add sudo before your command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tentenponce/KoinGraph/issues/15?email_source=notifications&email_token=ABI4Y4O3E2RCZI2P6BL44GLQXGPPVA5CNFSM4JO3EE52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCVEKQ#issuecomment-562385450, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI4Y4OVAXGRHPNL2XCM6WLQXGPPVANCNFSM4JO3EE5Q .

tentenponce commented 4 years ago

Hm you have a point, I think it should be written on what folder you are in so it doesn't require permissions. I'll check on this and update the library. Thanks .