Skip to content

Commit 3dcfff0

Browse files
authored
ci: fix docusaurus-mdx-checker installation (#2913)
* ci: fix broken docusaurus checker * better comment * rm trigger
1 parent 10496f9 commit 3dcfff0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/CI_check_api_ref.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ jobs:
109109
if: steps.changed.outputs.integrations != '[]'
110110
working-directory: website
111111
run: |
112+
# docusaurus-mdx-checker is a package that is not frequently updated. Its dependency katex sometimes ships a
113+
# broken ESM build, where a __VERSION__ placeholder is left unresolved, causing a ReferenceError at import time.
114+
# Node 22+ prefers ESM when available. We force CJS (CommonJS) resolution to use the working katex build.
115+
# This should be safe because docusaurus-mdx-checker and its dependencies provide CJS builds.
116+
export NODE_OPTIONS="--conditions=require"
112117
npx docusaurus-mdx-checker -v || {
113118
echo ""
114119
echo "For common MDX problems, see https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3#common-mdx-problems"

0 commit comments

Comments
 (0)