inukshuk / sqleton

Visualize your SQLite database schema
GNU General Public License v3.0
110 stars 12 forks source link

Unhandled 'error' event #9

Closed jacekmigacz closed 3 years ago

jacekmigacz commented 3 years ago

I was trying with fedora container image:

[root@6752916c1e61 /]# /node_modules/sqleton/bin/sqleton -o /tmp/test.svg  /tmp/p3WLCPRa/test.db
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn fdp 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 fdp',
  path: 'fdp',
  spawnargs: [ '-Tsvg', '-o/tmp/test.svg' ]
}
inukshuk commented 3 years ago

You need to install the graphviz package or make sure the fdp binary is in your path.

vjohansen commented 3 years ago

I had the same issue.

After installing graphviz on Windows I only have dot.exe so only -L dot works

inukshuk commented 3 years ago

@vjohansen thanks!

vjohansen commented 3 years ago

Also if I use sqleton to create .dot files then I can use dot.exe on these and set the layout method via -K.

For example dot -Kneato ... or

dot -Kfdp  -Tpng -odb.png db.dot