Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with canvas.node #43

Open
AhmedAbdalaty opened this issue Jun 9, 2023 · 2 comments
Open

Problem with canvas.node #43

AhmedAbdalaty opened this issue Jun 9, 2023 · 2 comments

Comments

@AhmedAbdalaty
Copy link

I have a problem running the package on a windows machine and I get this error every time

"
node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (...\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12) {
code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.16.0
"

@fsuk
Copy link

fsuk commented Jun 12, 2023

Getting the same issue.
Might be related to Automattic/node-canvas#930

@fsuk
Copy link

fsuk commented Jun 12, 2023

If using sharp in your project make sure to do the following anywhere sharp is imported (in this specific order)

import pdf2img from 'pdf-img-convert'
import { createCanvas } from 'canvas'
import sharp from 'sharp'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants