DenoDDeno
Powered by
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)
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
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);
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);
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Ngrok npm package error
NassingerNNassinger / help
17mo ago
Getting error trying to download NPM package
IndustrialIIndustrial / help
3y ago
Local npm package
RevadikeRRevadike / help
11mo ago