donmccurdy/glTF-Transform

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:

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!