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.

`main` branch not compat with remark-highlightjs?

See original GitHub issue

Currently getting: image

TypeError: Cannot read property 'highlight' of undefined

which occurs on this code:

data.hChildren = _lowlight.default.highlight(lang, node.value, {
  prefix
}).value;

which is transform via babel-jest -> babel -> @babel/plugin-transform-modules-commonjs

Versions: lowlight main (as of today: 869119be9a7f12eb5da0092800a7b4622d70499b) remark-highlightjs: 6.0.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
NullVoxPopulicommented, May 1, 2021

all good! at least the issue is known! 😄

1reaction
wooormcommented, May 1, 2021

We’re switching to ESM: https://github.com/unifiedjs/unified/issues/121. This post, linked to from the readme, goes into a bit more detail: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c. Specifically, lowlight#main does not have a default export

lowlight on main is waiting for the next major of highlight.js before being released, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

highlight.js demo
(* reasoning by induction over s. Then, we have two new goals corresponding on the case analysis about s (either it is niln...
Read more >
highlight.js is not working with markdown in Next.js App
Using the remark library, we converted markdown into html language and applied markdown styling. The problem is that I want to use highlight.js...
Read more >
observablehq/highlight.js
The CDN for @observablehq/highlight.js. ... Build Status](https://travis-ci.org/highlightjs/highlight.js.svg?branch=master)]( ... 77, In your main script:.
Read more >
How to set up syntax highlighting for Gatsby - Codepunkt
Highlighting of embedded CSS in JavaScript doesn't work. It is treated as a regular template string. The plugin does not take full advantage...
Read more >
remark-highlight.js
Legacy remark plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead. Latest version: 7.0.1, ...
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