Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import - asciidoctor@3.0.0-alpha.4 #557

Closed
taind772 opened this issue Mar 21, 2023 · 1 comment
Closed

Failed to import - asciidoctor@3.0.0-alpha.4 #557

taind772 opened this issue Mar 21, 2023 · 1 comment
Labels
deno Not working in Deno

Comments

@taind772
Copy link

Failing module asciidoctor@3.0.0-alpha.4

import {Asciidoctor} from 'https://esm.sh/asciidoctor@3.0.0-alpha.4'

console.log(Asciidoctor);

Error message

After running deno run I got this:

error: Uncaught SyntaxError: The requested module 'https://esm.sh/v111/asciidoctor@3.0.0-alpha.4' does not provide an export named 'Asciidoctor'
import {Asciidoctor} from 'https://esm.sh/v111/asciidoctor@3.0.0-alpha.4'
        ^
    at <anonymous> (file:///home/taind/code/personal/blogs/src/test.ts:1:9)

Additional info

  • esm.sh version: v111
  • Deno version: v1.31.2

Something like

import * as adoc from 'https://esm.sh/v111/asciidoctor@3.0.0-alpha.4'

console.log(adoc.default.default);

worked:

❯ deno run src/test.ts
[Function: Qt]

, but Deno lsp wasn't happy with it:
image

@taind772 taind772 added the deno Not working in Deno label Mar 21, 2023
@ije ije closed this as completed in 1d9aef0 Mar 22, 2023
@taind772
Copy link
Author

Thank you for your hard work, the above example work now 🥇

I'm now able to use the Asciidoctor package, but some bugs are still annoying me:

import { Asciidoctor } from "https://esm.sh/v113/asciidoctor@3.0.0-alpha.4";

const asciidoctor = new Asciidoctor();

console.log(asciidoctor);

After running deno run I got this:

❯ deno run -A src/main.ts
error: Uncaught SyntaxError: The requested module 'https://esm.sh/v113/asciidoctor@3.0.0-alpha.4' does not provide an export named 'Asciidoctor'
import { Asciidoctor } from "https://esm.sh/v113/asciidoctor@3.0.0-alpha.4";
         ^
    at <anonymous> (file:///.../src/main.ts:1:10)

but actually, it did provide an export class name Asciidoctor:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

1 participant