1 parent 907df80 commit 8743bc2Copy full SHA for 8743bc2
1 file changed
apps/sim/app/api/files/export/[id]/markdown-pdf.tsx
@@ -1,5 +1,5 @@
1
import { existsSync } from 'node:fs'
2
-import { createRequire } from 'node:module'
+import * as nodeModule from 'node:module'
3
import { join } from 'node:path'
4
import type { ReactNode } from 'react'
5
import {
@@ -39,7 +39,8 @@ interface PdfFont {
39
glyphs: GlyphFont
40
}
41
42
-const require = createRequire(import.meta.url)
+/** A runtime anchor preserves Node filesystem paths instead of bundler module IDs. */
43
+const require = nodeModule.createRequire(join(process.cwd(), 'package.json'))
44
45
/**
46
* Ensure a DOM exists for the TipTap Markdown parser used by this PDF-only server module. The
0 commit comments