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.

Can't resolve 'highlight.js/lib/languages/node-repl'

See original GitHub issue

Describe the bug

Can't resolve 'highlight.js/lib/languages/node-repl' in '/*/node_modules/react-syntax-highlighter/dist/esm/async-languages'

To Reproduce Have react-syntax-highlighter installed with other package that depends on a version of highlight.js that’s fixed to <10.4.0.

Expected behavior react-syntax-highlighter depends on highlight.js@^10.4.0 (instead of ^10.1.1) where node-repl was added.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aurelien-reevescommented, Dec 8, 2020

It seems I found a way to make it work:

I have removed lowlight and react-syntax-highlighter from the dependencies in package.json, then executed yarn install. It seems to have “cleaned-up” the yarn.lock file.

I have also clean the cache of yarn (yarn cache clean lowlight and yarn cache clean react-syntax-highlighter). I don’t know if that was actually usefull.

Then yarn add react-syntax-highlighter and yarn install again. The yarn.lock file now have only lowlight@1.17.0, and my build has passed.

0reactions
aurelien-reevescommented, Dec 10, 2020

Indeed I missed that! I assumed it was actually the case following the PR wich bump highlight.js to v10.4.1: https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/338

But actually, it just updated package-lock.json. Not package.json.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Website/browser build is not intended for use with Node.js ...
Looking at highlight.pack.js - both the downloaded and the one which I built, it seems that the code is supposed to work also...
Read more >
highlight.js
197 languages and 248 styles; automatic language detection; multi-language code highlighting; available for node.js; works with any markup; compatible with ...
Read more >
brief-highlightjs | Yarn - Package Manager
Highlight.js now defines a limited set of highlightable classes giving a consistent result across all the styles and languages. You can read a...
Read more >
Lowlight - npm.io
js' import md from 'highlight.js/lib/languages/markdown.js' lowlight.registerLanguage('markdown', md) ...
Read more >
Highlight-js | Fandom Developers Wiki
dev.highlight as an argument when resolved. hljs.loadAllLanguages: Loads all language components in the library. Returns a Deferred event ...
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