Closed chawza closed 3 days ago
Hi, could you try remark-pdf/node
?
It seems importing remark-pdf/node
is not working either:
Here is how I import it similar on the example:
import remarkGfm from 'remark-gfm'
import { remark } from 'remark'
import remarkMdx from 'remark-mdx'
import fs from 'fs';
import remarkpdf from 'remark-pdf/node';
And here is the result:
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/me/projects/project/node_modules/remark-pdf/node' imported from /home/me/projects/project/script/create-resume.mjs
at new NodeError (node:internal/errors:387:5)
at finalizeResolution (node:internal/modules/esm/resolve:330:11)
at moduleResolve (node:internal/modules/esm/resolve:907:10)
at defaultResolve (node:internal/modules/esm/resolve:1115:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
I'm using remark-pdf
version 0.0.9
@chawza
Sorry, I had removed remark-pdf/node
entry point accidentally.
I reverted it so please use 0.0.12
.
I have an .mdx file that I want to convert it into a .pdf file. The source file is an actual NextJs page (I don't insert any custom component, only layout wrapper).
My code:
Source file
But what i got is
Is there a way to fix this?