Closed dierk42 closed 3 years ago
Hello @dierk42,
Which version of Asciidoctor.js are you using? Could you please type asciidoctor -v
?
Oops. Quick reply. Thank you.
The output of asciidoctor.cmd (I use this because I also have installed the ruby asciidoctor):
C:\tmp> asciidoctor.cmd -v
Asciidoctor.js 2.2.5 (Asciidoctor 2.0.16) [https://asciidoctor.org]
Runtime Environment (node v14.17.5 on win32)
CLI version 3.4.0
Oh I see, I've updated the register
function to make it compatible with Asciidoctor.js 1.5.x (which is used in Antora 2.3) but the code is now incompatible with Asciidoctor.js > 2.
Having said that, it's an easy fix, I will fix this issue and publish a new version.
Perhaps these information may help. I used your example from your readme.md saving the script to mist.js. And I created your notebook example. The output is:
C:\tmp> node mist.js
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module '@asciidoctor/core'
Require stack:
- C:\tmp\mist.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\tmp\mist.js:1:21)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\tmp\\mist.js' ]
}
Perhaps there is also an issue with my node.js installation?
EDIT: changed my question
My posting crossed yours :-)
I'll watch for the new version. Thank you
My posting crossed yours :-)
No worries!
I'll watch for the new version. Thank you
Could you please try again with version 0.1.1?
It works! Great. Tahnk you very much.
Using it with
asciidoctor -r asciidoctor-jupyter -b jupyter notebook.adoc
gives the desired result. I tried another of my documents (just texts and images, ordinary documentation). Works as well. The only thing which is not so important: I used a footnote in that text. That was not konverted by your program. But thats only a very minor drawback, because Jupyter notebooks don't know footnotes.
The other way to invoke the converter via API still does not work an gives the above mentioned output.
But for myself: This issue is solved because currently I do not intend to use ist via the API.
Thank you very much for your instant reaction!
It works! Great. Tahnk you very much.
Perfect š
The other way to invoke the converter via API still does not work an gives the above mentioned output.
You probably didn't install the package asciidoctor
or @asciidoctor/core
in your Node project?
If you don't have a Node project you can create one with npm init -y
$ npm init -y
And then, you need to install both asciidoctor
and asciidoctor-jupyter
:
$ npm i --save-dev asciidoctor asciidoctor-jupyter
Thank you very much for your instant reaction!
Thank you for catching this bug š
I'm closing since this issue is fixed and I'm pretty sure it should work using the API when asciidoctor
or @asciidoctor/core
is installed.
I want to use asciidoctor-jupyter on Windows 8.1 an run into this problem (installation path of node.js is c:\nodejs):
I installed asciidoctor-jupyter via npm.
Any ideas?