sharp error
Closed this issue · 2 comments
Describe the bug
I get an Error with "Sharp" as I try to optimize a file
C:\Users\desig\Desktop>gltf-transform optimize Bruecke.glb Bruecke2.glb
error: Could not load the "sharp" module using the win32-x64 runtime
ERR_DLOPEN_FAILED: The specified procedure could not be found.
\?\C:\Users\desig\AppData\Roaming\npm\node_modules@gltf-transform\cli\node_modules@img\sharp-win32-x64\lib\sharp-win32-x64.node
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
yarn add sharp --ignore-engines - 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 for outdated versions of sharp in the dependency tree:
npm ls sharp - Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
There are two different versions. As the Error suggested I tried to install another sharp version, but didnt help I got just third version.
C:\Users\desig\Desktop>npm -g ls sharp
C:\Users\desig\AppData\Roaming\npm
-- @gltf-transform/cli@4.0.0 +-- @gltf-transform/functions@4.0.0 |
-- ndarray-pixels@4.0.0
| -- sharp@0.32.6
-- sharp@0.33.4
Hi @Moritz3DMedien! I've just published a v4.0.1 release, with ndarray-pixels
upgraded so that only the latest version of Sharp should be installed. Does that resolve the issue for you?
Yes! Works very well now. Thank you!