Skip to content

TypeError: process.getBuiltinModule is not a function #67

@doonpy

Description

@doonpy

Hi guys,
I'm trying to convert pdf to an image on NextJS App Router and met the following issue.
Would anyone be able to give me the solution to fix this?
Thank you

TypeError: process.getBuiltinModule is not a function
    at NodeCanvasFactory._createCanvas (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:10192:33)
    at NodeCanvasFactory.create (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:9694:29)
    at CachedCanvases.getCanvas (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:10890:46)
    at CanvasGraphics.paintInlineImageXObject (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:12921:51)
    at CanvasGraphics.paintImageXObject (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:12848:14)
    at CanvasGraphics.executeOperatorList (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:11506:28)
    at InternalRenderTask._next (/home/poonnguyen/skinexa/skinexa-web-app/.next/server/chunks/node_modules_pdfjs-dist_legacy_build_pdf_mjs_c5ce0f._.js:17239:41)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions