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

TypeError: Cannot read property 'onLinkHover' of undefined #2759

Closed
UziTech opened this issue Mar 14, 2020 · 8 comments
Closed

TypeError: Cannot read property 'onLinkHover' of undefined #2759

UziTech opened this issue Mar 14, 2020 · 8 comments

Comments

@UziTech
Copy link
Contributor

UziTech commented Mar 14, 2020

xterm-addon-webgl@latest (v0.5.1) does not work with xterm@latest (v4.4.0)

it throws error TypeError: Cannot read property 'onLinkHover' of undefined because xterm v4.4.0 does not have linkifier2 property on the terminal.

I think xterm-addon-webgl@0.5.1 was meant to be released as v0.6.0-beta.4

@UziTech
Copy link
Contributor Author

UziTech commented Mar 21, 2020

@Tyriar is webgl supposed to work with xterm v4.4?

@coderaiser
Copy link
Contributor

I have the same issue, this is how I use xterm-addon-webgl:

const {WebglAddon} = require('xterm-addon-webgl');
const {Terminal} = require('xterm');

const webglAddon = new WebglAddon();
const terminal = new Terminal({
    scrollback: 1000,
    tabStopWidth: 4,
});

terminal.open(document.body);
terminal.loadAddon(webglAddon);

On the last line I have:

xterm-addon-webgl.js:1 Uncaught TypeError: Cannot read property 'onLinkHover' of undefined
    at new e (xterm-addon-webgl.js:1)
    at new e (xterm-addon-webgl.js:1)
    at t.activate (xterm-addon-webgl.js:1)
    at e.loadAddon (xterm.js:1)
    at e.loadAddon (xterm.js:1)

@Tyriar Tyriar added this to the 4.5.0 milestone Mar 24, 2020
@Tyriar Tyriar added area/addon/webgl type/bug Something is misbehaving labels Mar 24, 2020
@Tyriar
Copy link
Member

Tyriar commented Mar 24, 2020

I think this happened because of an oversight by bumping the version in db30451

xterm-addon-webgl@0.5.1 is not compatible with xterm@0.4.0 so use 0.5.0 for now. I'll make a note on the releases page: https://github.com/xtermjs/xterm.js/releases

@Tyriar Tyriar closed this as completed Mar 24, 2020
@Tyriar Tyriar removed this from the 4.5.0 milestone Mar 24, 2020
@Tyriar Tyriar removed area/addon/webgl type/bug Something is misbehaving labels Mar 24, 2020
@Tyriar
Copy link
Member

Tyriar commented Mar 24, 2020

FYI @jerch

@jerch
Copy link
Member

jerch commented Mar 24, 2020

@Tyriar How could this happen? Only made a small bugfix in private code not touching any API stuff. Pending previous changes? I was not aware, that bugfix version jumps would publish on its own, sorry for that.

@Tyriar
Copy link
Member

Tyriar commented Mar 24, 2020

@jerch master moved on from 4.4 and I think webgl may have adopted internal naming changes since? Yep, bumping any addon versions will automatically publish, just like the main package.json.

@UziTech
Copy link
Contributor Author

UziTech commented Apr 10, 2020

Looks like this is still an issue in v0.6.0 even though the changelog says they are compatible.

https://github.com/xtermjs/xterm.js/releases/4.5.0

Edit: Actually looks like webgl v0.6.0 does work in xterm v4.5.0 🎉

@Tyriar
Copy link
Member

Tyriar commented Apr 10, 2020

@UziTech phew, had me worried for a second 😄

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

4 participants