question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`canvas` should not be a dependency if possible

See original GitHub issue

canvas has been added to the dependency, not devDependency, since v3.0.279. I don’t think it is a good idea. Because node-canvas prebuilds aren’t available for ARM, users with macOS on ARM will request helps from you, which would increase the maintenance burden. We can say the same thing for users with old Linux for which node-canvas prebuilds aren’t available.

When GitHub actions supports macOS on ARM, the situation would change.

  "dependencies": {
    "canvas": "^2.10.1",
    "web-streams-polyfill": "^3.2.1"
  },

Configuration:

  • PDF.js version: 3.0.279

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Snuffleupaguscommented, Nov 1, 2022

So by using optionalDependencies we basically change an install-time error into a potential run-time error for some (hopefully small number of) Node.js users, while avoiding any issues for browser users? If so, I suppose that we can try that; please submit a patch.

0reactions
timvandermeijcommented, Nov 26, 2022

Fixed in release 3.1.81.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue after upgrade using jsdom with optional dependencies
Describe the bug I noticed an issue after upgrading an ssr project with vite from 3.0.4 to 3.1.3. Using jsdom in a server...
Read more >
Solved: Importing canvas app to another tenant goes wrong
Solved: I exported a powerapp from a dev tenant I don't have anymore, when I requested a new dev tenant I tried importing...
Read more >
Canvas Dependencies - Immunity Inc.
Certain distros may have to compile the dependencies from source if a package is not available. Note: Package downloads are available from your...
Read more >
Menu in 3 Layer canvas: Violation with weak dependencies?
In Outsystems 11, for web applications, screen references are considered as weak dependencies so you can refer them without getting any violations. Regards,....
Read more >
eslint should be listed in the project's dependencies, not ...
Solved it with adding this to my .eslintrc : "import/no-extraneous-dependencies": ["error", {"devDependencies": true}].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found