spring-io / antora-extensions

Antora extensions developed for the Spring docs.
Apache License 2.0
7 stars 6 forks source link

asciinema-player 3.8.0 fails with exports #32

Open jvalkeal opened 3 weeks ago

jvalkeal commented 3 weeks ago

We get something like:

[14:07:34.284] FATAL (antora): Package subpath './dist/bundle/asciinema-player.min.js' is not defined by "exports" in /home/jvalkealahti/repos/spring/spring-cli/docs-build/.gradle/npm/_npx/4d870f89192857f1/node_modules/asciinema-player/package.json
    code: "ERR_PACKAGE_PATH_NOT_EXPORTED"
    type: "Error"

Caused by https://github.com/asciinema/asciinema-player/commit/8d3a7fec09a905f11899ec64ba26a35635498a89 as we load minified js via antora and I think it uses require. Asciinema prior 3.8.0 didn't have exports in package.json.

Think it's coming from here https://github.com/spring-io/antora-extensions/blob/4192ce017feb9fab0b5e66ffdadcf6bdfc7a6de3/lib/asciinema-extension.js#L30

Need to think if we pin version while searching a fix.

jvalkeal commented 2 weeks ago

It's easy to pin asciinema in an antora build itself, so should wait what happens to https://github.com/asciinema/asciinema-player/issues/263.