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.

TypeError: Could not find npm package 'highlight.js' matching 11.7.0. Try retrieving the latest npm package information by running with --reload

See original GitHub issue

Version

1.13.2

Platform

Ubuntu 20.04

What steps will reproduce the bug?

Build error

deno task build

How often does it reproduce? Is there a required condition?

deno task build

What is the expected behavior?

Build Error

What do you see instead?

TypeError: Could not find npm package 'highlight.js' matching 11.7.0. Try retrieving the latest npm package information by running with --reload
    at async createSite (https://deno.land/x/lume@v1.13.2/cli/run.ts:51:17)
    at async build (https://deno.land/x/lume@v1.13.2/cli/build.ts:28:16)
    at async Command.execute (https://deno.land/x/cliffy@v0.25.4/command/command.ts:1790:7)
    at async (https://deno.land/x/lume@v1.13.2/cli.ts:147:3)

No issues in 1.31.1

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mskiancommented, Dec 1, 2022

I had similar issues updating NPM packages. I think it’s because Deno caches the npm package internally. You can remove the Deno cache directory (deno info) or run the Lume task with the --reload flag:

{
  "importMap": "./import_map.json",
  "tasks": {
    "lume": "echo \"import 'lume/cli.ts'\" | deno run --reload --unstable -A -",
    "build": "deno task lume",
    "serve": "deno task lume -s"
  }
}

Once you run it with --reload, you can remove the flag because the new package is cached.

Fixed…

0reactions
oscaroterocommented, Dec 1, 2022

Probably lume upgrade should remove the deno.lock file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm specifier on binary command doesn't default to use latest ...
Try retrieving the latest npm package information by running with ... TypeError: Could not find npm package 'highlight.js' matching 11.7.0.
Read more >
highlight.js - npm
Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It can work with...
Read more >
Can't install any package with node npm - Stack Overflow
I'm trying to install some node packages through npm, but it won't go. I've already tried to install/unistall/update node, but nothing seems to ......
Read more >
The Difference Between Node.js 10 LTS and Node.js 12 LTS
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >
got-caseless - npm Package Health Analysis - Snyk
Human-friendly and powerful HTTP request library for Node.js. Fork that uses caseless instead of lowercase-keys for headers.
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