Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to run on my machine #1

Open
talwrii opened this issue Dec 11, 2017 · 5 comments
Open

Doesn't seem to run on my machine #1

talwrii opened this issue Dec 11, 2017 · 5 comments

Comments

@talwrii
Copy link

talwrii commented Dec 11, 2017

$ i3-save-tree | i3-layout-to-dot 
/home/user/.local/lib/node_modules/i3-layout-viewer/node_modules/jgf-dot/index.js:12
                if (node.metadata)
                        ^

TypeError: Cannot read property 'metadata' of undefined
    at /home/user/.local/lib/node_modules/i3-layout-viewer/node_modules/jgf-dot/index.js:12:11
    at Array.forEach (native)
    at toDot (/home/user/.local/lib/node_modules/i3-layout-viewer/node_modules/jgf-dot/index.js:10:24)
    at /home/user/.local/lib/node_modules/i3-layout-viewer/bin/cli.js:14:15
    at Gatherer.<anonymous> (/home/user/.local/lib/node_modules/i3-layout-viewer/node_modules/read-file-stdin/node_modules/gather-stream/index.js:41:5)
    at emitNone (events.js:72:20)
    at Gatherer.emit (events.js:166:7)
    at finishMaybe (_stream_writable.js:482:14)
    at endWritable (_stream_writable.js:492:3)
    at Gatherer.Writable.end (_stream_writable.js:457:5)
node --version
v4.8.4

I'm using debian testing.

@cbenz
Copy link
Owner

cbenz commented Dec 11, 2017

Hi @talwrii

thanks for taking the time to create an issue.

Running from the source code directory of i3-layout-viewer:

$ npm install
$ i3-save-tree | ./bin/cli.js 
digraph {
  "0" [id=0,label=tabbed,metadata="{\"border\":\"normal\",\"floating\":\"auto_off\",\"layout\":\"tabbed\",\"percent\":1,\"type\":\"con\"}"]
  "1" [id=1,label="i3-save-tree | ./bin/cli.js",metadata="{\"border\":\"normal\",\"current_border_width\":5,\"floating\":\"auto_off\",\"geometry\":{\"height\":820,\"width\":1284,\"x\":0,\"y\":0},\"name\":\"i3-save-tree | ./bin/cli.js\",\"percent\":0.5,\"swallows\":[{}],\"type\":\"con\"}"]
  "2" [id=2,label="Doesn't seem to run on my machine · Issue #1 · cbenz/i3-layout-viewer - Chromium",metadata="{\"border\":\"normal\",\"current_border_width\":5,\"floating\":\"auto_off\",\"geometry\":{\"height\":1360,\"width\":2562,\"x\":0,\"y\":127},\"name\":\"Doesn't seem to run on my machine · Issue #1 · cbenz/i3-layout-viewer - Chromium\",\"percent\":0.5,\"swallows\":[{}],\"type\":\"con\"}"]
  "0" -> "1" [source=0,target=1]
  "0" -> "2" [source=0,target=2]
}
node --version
v6.11.4

I'm using Arch Linux.

The error seems to be in jgf-dot.

Could you try using a more recent version of nodejs? The best would be the long-term support (LTS) version, installable via https://github.com/creationix/nvm

I'm sorry I don't have much time to investigate more.

@talwrii
Copy link
Author

talwrii commented Dec 11, 2017

I'm sorry I don't have much time to investigate more.

All good. Just thought you might like a heads-up.

I guess debian doesn't care about having up-to-date versions of node :/.

@r3pek
Copy link

r3pek commented Dec 8, 2018

@cbenz I'm hitting the same error on arch as of today. You still using this?

i3-save-tree --workspace 7 | egrep -v "^\s*\/\/" | ./cli.js 
/usr/lib/node_modules/i3-layout-viewer/node_modules/graphlib-json-graph/index.js:19
	throw new TypeError("No graphs defined");
	^

TypeError: No graphs defined
    at toGraph (/usr/lib/node_modules/i3-layout-viewer/node_modules/graphlib-json-graph/index.js:19:8)
    at toDot (/usr/lib/node_modules/i3-layout-viewer/node_modules/jgf-dot/index.js:7:22)
    at /usr/lib/node_modules/i3-layout-viewer/node_modules/jgf-dot/bin/cli.js:9:24
    at Gatherer.<anonymous> (/usr/lib/node_modules/i3-layout-viewer/node_modules/gather-stream/index.js:41:5)
    at Gatherer.emit (events.js:187:15)
    at finishMaybe (_stream_writable.js:646:14)
    at endWritable (_stream_writable.js:663:3)
    at Gatherer.Writable.end (_stream_writable.js:594:5)
    at Socket.onend (_stream_readable.js:632:10)
    at Object.onceWrapper (events.js:273:13)

@cbenz
Copy link
Owner

cbenz commented Dec 10, 2018

Hi @r3pek

I don't use this tool for myself. I developed it just for fun and don't plan to spend time on it.

Feel free to contribute by fixing bugs, or forking the project.

@r3pek
Copy link

r3pek commented Dec 10, 2018

@cbenz if only i'd know how ;) thx anyway

@afreakk afreakk mentioned this issue Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants