question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`setupTwoslashHovers` is unavailable from `shiki-twoslash/dist/dom`, but hover is unavailable without it.

See original GitHub issue

Environment

Node 16.0.0 Yarn gatsby-remark-shiki-twoslash: 3.0.7 shiki-twoslash: 1.6.2 Windows 10

Bug

I just did a fairly big version jump of gatsby-remark-shiki-twoslash from 0.7.0 to 3.0.7, and I’ve started getting errors on the line:

import { setupTwoslashHovers } from "shiki-twoslash/dist/dom";

This import mentioned anywhere in the docs, but it was in the TypeScript website code a while back. Strangely, the code is still in shiki-twoslash source in this project, and dom.d.ts is available in node_modules, but there are no references to setupTwoslashHovers anywhere else, and no dom.js file alongside dom.d.ts to import. If I take out the import, it fixes the errors, I lose all tooltips in code examples.

Has this changed in v2 or v3? There doesn’t seem to be a changelog, so I’m not really sure what I’m doing wrong here.

Reproduction

Project link: https://github.com/threehams/typescript-quirks

I am very new to Gatsby and would have trouble cutting this example down.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
threehamscommented, Jul 9, 2021

Still, I could have struggled with this for two days and still saved time over what I was doing before!

0reactions
ortacommented, Jul 16, 2021

Hah, yep, if it’s still in there

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is hover mode unavailable? : r/Warthunder - Reddit
So I wanted to test fly the harrier and yak 38, and hover mode does not work! any help with this?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found