DenoDDeno
Powered by
smbkrS
Denoβ€’3y agoβ€’
2 replies
smbkr

Importing NPM packages with `npm:` where package has `@` in the name

I want to import the package
@hono/zod-openapi
@hono/zod-openapi
, version
0.30
0.30


I tried to add to my
deno.json
deno.json
like so:

{
  "imports": {
    "@hono/zod-openapi": "npm:@hono/zod-openapi@0.3.0",
  }
}
{
  "imports": {
    "@hono/zod-openapi": "npm:@hono/zod-openapi@0.3.0",
  }
}


but it doesn't work:

error: Could not resolve 'npm:@hono/zod-openapi@0.3.0'.

Caused by:
    not found
error: Could not resolve 'npm:@hono/zod-openapi@0.3.0'.

Caused by:
    not found


I also tried: removing the leading
@
@
and tried
@hono@0.3.0/zod-openapi
@hono@0.3.0/zod-openapi
but those don't work either.
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

importing scoped NPM packages from other registries
Mike WilkersonMMike Wilkerson / help
3y ago
Importing NPM Packages in Deno Throws 'Uncaught SyntaxError' for Specific Modules
SchmukiSSchmuki / help
3y ago