I tried to implement this but I found that when using >= next.58 an error is thrown when compiling the code. After finding #29 I reverted back to next.43, but that doesn't take away that this library currently doesn't supported the latest next release.
<html>
<body>
<!--StartFragment--><pre class="c_c c_bw c_mx c_my c_qp c_qq c_de c_rg c_rh c_ri c_rj c_fc c_fd c_qr c_by c_rk" style="box-sizing: border-box; border-radius: 0px; color: rgb(217, 217, 217); display: block; font-size: 12px; margin: 0px; overflow: auto; padding: 16px 32px; width: 1262px; background-color: rgb(29, 29, 29); border-width: 0px 0px 1px; border-style: solid; border-color: rgb(61, 61, 61) rgb(61, 61, 61) rgb(49, 49, 49); border-image: initial; font-family: monaco, courier, monospace; height: 500px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
13:53:07.493 | Cloning repository...
-- | --
13:53:08.192 | From https://github.com/favna/nintendo-switch-eshop
13:53:08.193 | * branch 28d0053ac2a097a6864d877d91c0650fc1635589 -> FETCH_HEAD
13:53:08.193 |
13:53:08.245 | HEAD is now at 28d0053 chore(deps): update all non-major dependencies
13:53:08.246 |
13:53:08.330 |
13:53:08.331 | Using v2 root directory strategy
13:53:08.356 | Success: Finished cloning repository files
13:53:09.901 | Checking for configuration in a wrangler.toml configuration file (BETA)
13:53:09.902 |
13:53:09.902 | Found wrangler.toml file. Reading build configuration...
13:53:09.907 | pages_build_output_dir: dist
13:53:09.907 | Build environment variables: (none found)
13:53:10.018 | Successfully read wrangler.toml file.
13:53:10.108 | Restoring from dependencies cache
13:53:10.125 | Restoring from build output cache
13:53:10.375 | Detected the following tools from environment: [email protected], [email protected], [email protected]
13:53:10.734 | Preparing [email protected] for immediate activation...
13:53:11.367 | Installing project dependencies: yarn
13:53:12.290 | ➤ YN0000: · Yarn 4.1.1
13:53:12.302 | ➤ YN0000: ┌ Resolution step
13:53:12.593 | ➤ YN0000: └ Completed in 0s 292ms
13:53:12.651 | ➤ YN0000: ┌ Fetch step
13:53:29.428 | ➤ YN0013: │ 1200 packages were added to the project (+ 173.08 MiB).
13:53:29.428 | ➤ YN0000: └ Completed in 16s 777ms
13:53:29.488 | ➤ YN0000: ┌ Link step
13:53:37.889 | ➤ YN0007: │ esbuild@npm:0.19.12 must be built because it never has been before or the last one failed
13:53:37.890 | ➤ YN0007: │ esbuild@npm:0.20.2 must be built because it never has been before or the last one failed
13:53:37.890 | ➤ YN0007: │ sharp@npm:0.33.3 must be built because it never has been before or the last one failed
13:53:37.891 | ➤ YN0007: │ esbuild@npm:0.17.19 must be built because it never has been before or the last one failed
13:53:37.891 | ➤ YN0007: │ workerd@npm:1.20240419.0 must be built because it never has been before or the last one failed
13:53:38.570 | ➤ YN0000: └ Completed in 9s 82ms
13:53:38.696 | ➤ YN0000: · Done in 26s 406ms
13:53:38.940 | Executing user command: yarn run build
13:53:41.989 | 11:53:41 AM [vite] Error when evaluating SSR module /@fs/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts: failed to import "typedoc-plugin-markdown"
13:53:41.989 | \|- SyntaxError: [vite] Named export 'MarkdownThemeRenderContext' not found. The requested module 'typedoc-plugin-markdown' is a CommonJS module, which may not support all module.exports as named exports.
13:53:41.989 | CommonJS modules can always be imported via the default export, for example using:
13:53:41.990 |
13:53:41.990 | import pkg from 'typedoc-plugin-markdown';
13:53:41.990 | const {MarkdownThemeRenderContext} = pkg;
13:53:41.990 |
13:53:41.990 | at analyzeImportedModDifference (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54043:19)
13:53:41.990 | at nodeImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55079:9)
13:53:41.990 | at async ssrImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54976:24)
13:53:41.991 | at async eval (/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts:5:31)
13:53:41.991 | at async instantiateModule (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
13:53:41.991 |
13:53:41.991 | 11:53:41 AM [vite] Error when evaluating SSR module /@fs/opt/buildhome/repo/node_modules/starlight-typedoc/libs/typedoc.ts: failed to import "/@fs/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts"
13:53:41.991 | \|- SyntaxError: [vite] Named export 'MarkdownThemeRenderContext' not found. The requested module 'typedoc-plugin-markdown' is a CommonJS module, which may not support all module.exports as named exports.
13:53:41.991 | CommonJS modules can always be imported via the default export, for example using:
13:53:41.991 |
13:53:41.992 | import pkg from 'typedoc-plugin-markdown';
13:53:41.992 | const {MarkdownThemeRenderContext} = pkg;
13:53:41.992 |
13:53:41.992 | at analyzeImportedModDifference (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54043:19)
13:53:41.992 | at nodeImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55079:9)
13:53:41.992 | at async ssrImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54976:24)
13:53:41.992 | at async eval (/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts:5:31)
13:53:41.992 | at async instantiateModule (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
13:53:41.993 |
13:53:41.993 | 11:53:41 AM [vite] Error when evaluating SSR module /@fs/opt/buildhome/repo/node_modules/starlight-typedoc/index.ts: failed to import "/@fs/opt/buildhome/repo/node_modules/starlight-typedoc/libs/typedoc.ts"
13:53:41.993 | \|- SyntaxError: [vite] Named export 'MarkdownThemeRenderContext' not found. The requested module 'typedoc-plugin-markdown' is a CommonJS module, which may not support all module.exports as named exports.
13:53:41.993 | CommonJS modules can always be imported via the default export, for example using:
13:53:41.993 |
13:53:41.993 | import pkg from 'typedoc-plugin-markdown';
13:53:41.993 | const {MarkdownThemeRenderContext} = pkg;
13:53:41.993 |
13:53:41.993 | at analyzeImportedModDifference (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54043:19)
13:53:41.993 | at nodeImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55079:9)
13:53:41.994 | at async ssrImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54976:24)
13:53:41.994 | at async eval (/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts:5:31)
13:53:41.994 | at async instantiateModule (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
13:53:41.994 |
13:53:41.994 | 11:53:41 AM [vite] Error when evaluating SSR module /opt/buildhome/repo/documentation/astro.config.mts: failed to import "/@fs/opt/buildhome/repo/node_modules/starlight-typedoc/index.ts"
13:53:41.994 | \|- SyntaxError: [vite] Named export 'MarkdownThemeRenderContext' not found. The requested module 'typedoc-plugin-markdown' is a CommonJS module, which may not support all module.exports as named exports.
13:53:41.994 | CommonJS modules can always be imported via the default export, for example using:
13:53:41.994 |
13:53:41.994 | import pkg from 'typedoc-plugin-markdown';
13:53:41.994 | const {MarkdownThemeRenderContext} = pkg;
13:53:41.995 |
13:53:41.995 | at analyzeImportedModDifference (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54043:19)
13:53:41.995 | at nodeImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55079:9)
13:53:41.995 | at async ssrImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54976:24)
13:53:41.995 | at async eval (/opt/buildhome/repo/node_modules/starlight-typedoc/libs/theme.ts:5:31)
13:53:41.995 | at async instantiateModule (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
13:53:41.995 |
13:53:41.995 | [astro] Unable to load your Astro config
13:53:41.996 |
13:53:42.458 | [vite] Named export 'MarkdownThemeRenderContext' not found. The requested module 'typedoc-plugin-markdown' is a CommonJS module, which may not support all module.exports as named exports.
13:53:42.458 | CommonJS modules can always be imported via the default export, for example using:
13:53:42.458 |
13:53:42.459 | import pkg from 'typedoc-plugin-markdown';
13:53:42.459 | const {MarkdownThemeRenderContext} = pkg;
13:53:42.459 |
13:53:42.459 | Stack trace:
13:53:42.459 | at analyzeImportedModDifference (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54043:19)
13:53:42.459 | at async ssrImport (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:54976:24)
13:53:42.459 | at async instantiateModule (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
13:53:42.607 | Failed: Error while executing user command. Exited with error code: 1
13:53:42.618 | Failed: build command exited with code: 1
13:53:43.468 | Failed: error occurred while running build command
</pre><!--EndFragment-->
</body>
</html>
The code builds normally, without errors.