asciidoctor / asciidoctor-reveal.js

:crystal_ball: A reveal.js converter for Asciidoctor and Asciidoctor.js. Write your slides in AsciiDoc!
http://asciidoctor.org
Other
287 stars 189 forks source link

TypeError: Opal.queue is not a function #528

Closed gAmUssA closed 3 months ago

gAmUssA commented 3 months ago

Team, I'm following the latest documentation for revealjs and asciidoc and I'm experience issues

node 16 macos 14.4

❱ ./node_modules/.bin/asciidoctor-revealjs --version
/Users/vikgamov/projects/pinot/learn/pinot-advanced/node_modules/@asciidoctor/reveal.js/dist/main.js:4570
Opal.queue(function(Opal) {/* Generated by Opal 1.7.3 */
     ^

TypeError: Opal.queue is not a function
    at initialize (/Users/vikgamov/projects/pinot/learn/pinot-advanced/node_modules/@asciidoctor/reveal.js/dist/main.js:4570:6)
    at resolveModule (/Users/vikgamov/projects/pinot/learn/pinot-advanced/node_modules/@asciidoctor/reveal.js/dist/main.js:4587:7)
    at Object.register (/Users/vikgamov/projects/pinot/learn/pinot-advanced/node_modules/@asciidoctor/reveal.js/dist/main.js:4610:12)
    at Object.<anonymous> (/Users/vikgamov/projects/pinot/learn/pinot-advanced/node_modules/@asciidoctor/reveal.js/npm/asciidoctor-revealjs:9:21)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

What am I missing?

Thank you

ggrossetie commented 3 months ago

Hey!

This error usually means that there's a version mismatch between Asciidoctor.js and Asciidoctor reveal.js.

$ npm list
asciidoctor-revealjs@1.0.0 /home/guillaume/Workspace/tmp/asciidoctor-revealjs
├── @asciidoctor/reveal.js@5.1.0
└── asciidoctor@3.0.4
$ ./node_modules/.bin/asciidoctor-revealjs --version
Asciidoctor reveal.js 5.1.0 using Asciidoctor.js 3.0.4 (Asciidoctor 2.0.20) [https://asciidoctor.org]
Runtime Environment (node v20.8.0 on linux)
CLI version 4.0.0
ggrossetie commented 3 months ago

It might be related to: https://github.com/asciidoctor/asciidoctor.js/issues/1728 since latest currently points to Asciidoctor.js 2.x instead of Asciidoctor.js 3.x.

gAmUssA commented 3 months ago

Yes, I think it's indeed related to the issue. So, I went and wrote dependencies explicitly.

pinot-advanced-presentation@1.0.0 /Users/vikgamov/projects/pinot/learn/pinot-advanced
├── @asciidoctor/reveal.js@5.1.0
└── asciidoctor@3.0.4