-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cannot find module '@napi-rs/canvas' #84
Comments
Looks like it's an issue with the latest pdfjs-dist switching to a new canvas project: mozilla/pdf.js#19145 You should be able to use an older version like 4.8.69. |
Latest pdfjs-dist release 4.9.124 replaced node-canvas with I will look into updating |
Yeah I have downgraded
…On Thu, 5 Dec 2024 at 8:24 PM, Nikita Moshenskiy ***@***.***> wrote:
Latest pdfjs-dist release 4.9.124
<https://github.com/mozilla/pdf.js/releases/tag/v4.9.124> replaced
node-canvas <https://github.com/Automattic/node-canvas> with
@napi-rs/canvas as well as updated Node.js minimum supported version to
v20.
I will look into updating pdf-visual-diff to support latest pdfjs-dist
asap. Until than it would be best to make sure one is using pdfj-dist
v4.8.69 as suggested by @jrohland <https://github.com/jrohland>.
—
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP7NVPLOBBVVE37ZS32M6K32EALVPAVCNFSM6AAAAABS64PNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZG4ZTANZUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have just published new v0.14.0. Please check the changelog, because there are breaking changes. Although it shouldn't be a big deal. |
Thanks for the update, pdfjs and the old canvas library not providing builds was holding us back from upgrading to node v22. With the move to the new canvas library it looks good to update to node v22. |
Error: Cannot find module '@napi-rs/canvas'
Require stack:
/home/runner/work/pdf.js/pdf.js/src/display/node_utils.js
at utils/pdfUtils.js:11
Sorry to bother you with another issue. After upgrading to latest version 0.13.0 - runs were fine for couple of days. Then starting yesterday - it started failing with above issue.
All the dev dependencies I am using
"devDependencies": {
"@faker-js/faker": "8.0.2",
"@playwright/test": "^1.35.1",
"date-and-time": "^2.0.0",
"express": "^4.19.2",
"p-retry": "^4.6.1",
"playwright": "^1.35.1",
"prettier": "3.3.3",
"supertest": "^6.1.6",
"pdf-lib": "^1.17.1",
"pdf-visual-diff": "^0.12.0",
"card-number-generator": "^0.0.2"
}
npm - 10.8.2
node - v20.17.0
The text was updated successfully, but these errors were encountered: