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

Improve error message to use sharp in electron ( for yarn ) #4216

Closed
Makio64 opened this issue Sep 12, 2024 · 3 comments
Closed

Improve error message to use sharp in electron ( for yarn ) #4216

Makio64 opened this issue Sep 12, 2024 · 3 comments
Labels

Comments

@Makio64
Copy link

Makio64 commented Sep 12, 2024

Feature request

What are you trying to achieve?

When using sharp in electron I got an error.
In previous version the error message indicate the commands to fix the issue on npm and yarn, now only for npm

What would you expect the API to look like?

Write the solution for yarn : yarn add sharp --ignore-engines
Ideally for pnpm as well.

What alternatives have you considered?

Would be great if it works out of the box on electron but it seems difficult.

Please provide sample image(s) that help explain this feature

When using sharp in Electron : Uncaught Exception: Error: Could not load the "sharp" module using the darwin-arm64 runtime
Screenshot 2024-09-12 at 15 28 43

after yarn add sharp --ignore-engines it works.

@lovell
Copy link
Owner

lovell commented Sep 12, 2024

Please ensure you are using the latest version, currently v0.33.5.

#4130

@lovell lovell closed this as completed Sep 12, 2024
@Makio64
Copy link
Author

Makio64 commented Sep 12, 2024

I'm using the v0.33.5

@lovell
Copy link
Owner

lovell commented Sep 13, 2024

This looks more like an Electron packaging issue rather than a yarn installation issue, based partly on the .app/Contents/... path in the screenshot.

The use of yarn v1 at install time is tested via a post-release CI job:

- name: Run with Node.js + yarn v1
if: ${{ matrix.package-manager == 'yarn-v1' }}
run: |
corepack enable
yarn set version classic
yarn install
node release.mjs

https://github.com/lovell/sharp/actions/runs/10419935381/job/28860731321

If you still require help, please provide a minimal sample repo that allows someone else to reproduce.

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

No branches or pull requests

2 participants