You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using windows @vite-pwa/assets-generator: ^0.2.6 and get this error with yarn dev.
Error: Could not load the "sharp" module using the win32-x64 runtime
ERR_DLOPEN_FAILED: The specified procedure could not be found.
\\?\X:\paht_to_the_project\node_modules\@img\sharp-win32-x64\lib\sharp-win32-x64.node
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=win32 --cpu=x64 sharp
- Using the canvas package on Windows?
See https://sharp.pixelplumbing.com/install#canvas-and-windows
- Check foroutdated versions of sharpin the dependency tree:
npm ls sharp
- Consult the installation documentation:
It comes from yarn installing two different versions of sharp in yarn.lock (^0.33.5 is the latest and ^0.32.6 is your dependency). Here is the yarn.lock:
I'm using windows
@vite-pwa/assets-generator: ^0.2.6
and get this error withyarn dev
.It comes from yarn installing two different versions of sharp in
yarn.lock
(^0.33.5
is the latest and^0.32.6
is your dependency). Here is theyarn.lock
:I was looking for a solution and after an hour I found this solution: lovell/sharp#3878 (comment)
It resolves the issue by adding these lines to
package.json
:The text was updated successfully, but these errors were encountered: