Closed alaindresse closed 2 months ago
Workaround (requires modifying the extension) for those having a similar issue:
With Node 20, I could actually import the content-classifier without await import in antoraSupport.ts:
import * as contentClassifier from '@antora/content-classifier'
const classifyContent = contentClassifier.default || contentClassifier
and comment later in antoraSupport.ts
// let classifyContent = await import('@antora/content-classifier')
// if ('default' in classifyContent) {
// classifyContent = classifyContent.default // default export
// }
VS code will eventually support dynamic imports (see https://github.com/microsoft/vscode/issues/226260) but until then we should use a static import.
Hi @ggrossetie , can I ask when this issue fix gonna be released? Or how can I apply it without manually changing the extension code?
Hi @ggrossetie , can I ask when this issue fix gonna be released? Or how can I apply it without manually changing the extension code?
Can someone please help me with this?
Hello @BcOleks I will try to release a new version this week. In the meantime, you want install the extension from the source code (you can find some guidance here: https://github.com/asciidoctor/asciidoctor-vscode/blob/master/CONTRIBUTING.adoc)
Since my last vscode update, I can no longer preview a page with antora references (e.g. include::partial$...antora documentation since the latest vscode update (even tried to reinstall vscode from scratch).
When I open the developer tools, I see a bunch of errors like
which seem to be related to
[antoraSupport.ts:319] let classifyContent = await import('@antora/content-classifier')
(for reference, initially discussed on Asciidoctor zulip chat