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

I failed to add sharp to my electron using pnpm #3826

Closed
tetap opened this issue Oct 15, 2023 · 2 comments
Closed

I failed to add sharp to my electron using pnpm #3826

tetap opened this issue Oct 15, 2023 · 2 comments

Comments

@tetap
Copy link

tetap commented Oct 15, 2023

[1] The specified module could not be found.
[1] \?\G:\packages\electron\node_modules\sharp\build\Release\sharp-win32-x64.node
[1]
[1] Possible solutions:
[1] - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
[1] - Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp"
[1] - Consult the installation documentation: https://sharp.pixelplumbing.com/install

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?

System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 5.58 GB / 15.89 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.6.10 - ~\AppData\Roaming\npm\pnpm.CMD
npmPackages:
sharp: ^0.32.6 => 0.32.6

@tetap tetap changed the title 我使用pnpm为我的electron添加sharp失败 I failed to add sharp to my electron using pnpm Oct 15, 2023
@tetap
Copy link
Author

tetap commented Oct 15, 2023

image
image

I can see the build, but the run keeps failing

@tetap
Copy link
Author

tetap commented Oct 15, 2023

#3351

I finally solved the issue through this. You must manually enter sharp to install.

@lovell lovell closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants