AudrowA
Denoβ€’2y agoβ€’
1 reply
Audrow

Error in npm package - how to squelch?

I'm using an npm package that I think isn't being processed for Deno correctly.

I get this error:
This expression is not constructable.
  Type 'typeof import("file:///Users/audrow/Library/Caches/deno/npm/registry.npmjs.org/sitemapper/3.2.8/sitemapper")' has no construct signatures.deno-ts(2351)


I can
deno run
it and it works fine. But is there a way to remove the error from my editor?

Here's a minimal code example. I'm using Deno 1.41.3.
import Sitemapper from 'npm:sitemapper'

const distro = 'rolling'
const url = `https://docs.ros.org/en/${distro}/sitemap.xml`

const sitemap = new Sitemapper();
const {sites} = await sitemap.fetch(url);
console.log(sites);
Was this page helpful?