Skip to content

fix: add @napi-rs/canvas to avoid dependency missing on dev startup#13685

Merged
DeJeune merged 1 commit intoCherryHQ:mainfrom
alephpiece:fix/napi-rs-canvas
Mar 21, 2026
Merged

fix: add @napi-rs/canvas to avoid dependency missing on dev startup#13685
DeJeune merged 1 commit intoCherryHQ:mainfrom
alephpiece:fix/napi-rs-canvas

Conversation

@alephpiece
Copy link
Copy Markdown
Collaborator

@alephpiece alephpiece commented Mar 21, 2026

What this PR does

Add napi-rs/canvas to dependency to avoid dev startup crash

Before this PR:

Warning: Cannot polyfill `DOMMatrix`, rendering may be broken.
Warning: Cannot polyfill `ImageData`, rendering may be broken.
Warning: Cannot polyfill `Path2D`, rendering may be broken.
App threw an error during load
ReferenceError: DOMMatrix is not defined

After this PR:

Fixes #

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Breaking changes

If this PR introduces breaking changes, please describe the changes and the impact on users.

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

Add napi-rs/canvas to dependency to avoid dev startup crash.

@EurFelux
Copy link
Copy Markdown
Collaborator

EurFelux commented Mar 21, 2026

Note

This issue/comment/review was translated by Claude.

This is an indirect dependency, it's better not to include it in the declaration. We have a simpler solution now, which is to put pdf-parse in dependencies


Original Content

这个是间接依赖,最好不放声明里。我们现在有一个更简单的解决方案是把pdf-parse放到dependencies里面去

@DeJeune DeJeune merged commit 0fbd114 into CherryHQ:main Mar 21, 2026
9 checks passed
@DeJeune
Copy link
Copy Markdown
Collaborator

DeJeune commented Mar 21, 2026

Note

This issue/comment/review was translated by Claude.

That's awkward, I acted too quickly


Original Content

难绷,手快了

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

Successfully merging this pull request may close these issues.

5 participants