lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
28.46k stars 1.28k forks source link

Error: Something went wrong installing the "sharp" module #3007

Closed 1intan99 closed 2 years ago

1intan99 commented 2 years ago

So im trying to convert image buffer download from axios then convert to jpeg with sharp and i got this error Im install sharp using yarn

Yarn version: 1.22.17 Node version: 16.13.1 Os: Windows 11 Arch: x64

D:\MeeS\Development\MeeS-Dev\node_modules\sharp\lib\sharp.js:30 throw new Error(help.join('\n')); ^ D:\MeeS\Development\MeeS-Dev\node_modules\sharp\lib\sharp.js:30 throw new Error(help.join('\n')); ^

Error: Something went wrong installing the "sharp" module

The specified procedure could not be found. \?\D:\MeeS\Development\MeeS-Dev\node_modules\sharp\build\Release\sharp-win32-x64.node

Possible solutions:

lovell commented 2 years ago

What is the complete output of running npm install --verbose sharp?

What is the output of npm ls sharp and npm ls -g sharp?

Are you also using canvas? Did you see https://sharp.pixelplumbing.com/install#known-conflicts

1intan99 commented 2 years ago

Yes, i have canvas installed on my depedencise, should i remove that?

Cause i need canvas for discord bot leveling profile

lovell commented 2 years ago

On Windows, you cannot use both sharp and canvas and there is no workaround.

The prebuilt binaries provided by canvas for Windows depend on the unmaintained GTK 2, last updated in 2011.

These conflict with the modern, up-to-date binaries provided by sharp.

If both modules are used in the same Windows process, the following error will occur:

The specified procedure could not be found.

https://sharp.pixelplumbing.com/install#canvas-and-windows

1intan99 commented 2 years ago

hmmm alright, thanks you so much for helping me with this error

harisghulam commented 2 years ago

Error: Something went wrong installing the "sharp" module

I've tried several existing solutions, but still not resolved.

npm install --verbose sharp

npm verb cli [ npm verb cli 'C:\Program Files\nodejs\node.exe', npm verb cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', npm verb cli 'install', npm verb cli '--verbose', npm verb cli 'sharp' npm verb cli ] npm info using npm@8.1.0 npm info using node@v16.13.0 npm timing npm:load:whichnode Completed in 1ms npm timing config:load:defaults Completed in 3ms npm timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Compl eted in 6ms npm timing config:load:builtin Completed in 6ms npm timing config:load:cli Completed in 4ms npm timing config:load:env Completed in 0ms npm timing config:load:file:C:\Users\GeeiKa.com\whatsapp-web.npmrc Completed in 0ms npm timing config:load:project Completed in 2ms npm timing config:load:file:C:\Users\GeeiKa.com.npmrc Completed in 2ms npm timing config:load:user Completed in 2ms npm timing config:load:file:C:\Users\GeeiKa.com\AppData\Roaming\npm\etc\npmrc Co mpleted in 0ms npm timing config:load:global Completed in 0ms npm timing config:load:validate Completed in 2ms npm timing config:load:credentials Completed in 2ms npm timing config:load:setEnvs Completed in 2ms npm timing config:load Completed in 24ms npm timing npm:load:configload Completed in 25ms npm timing npm:load:setTitle Completed in 0ms npm timing npm:load:setupLog Completed in 1ms npm timing config:load:flatten Completed in 7ms npm timing npm:load:cleanupLog Completed in 5ms npm timing npm:load:configScope Completed in 0ms npm timing npm:load:projectScope Completed in 2ms npm timing npm:load Completed in 138ms npm timing arborist:ctor Completed in 2ms npm timing idealTree:init Completed in 192ms npm timing idealTree:userRequests Completed in 2ms npm timing arborist:ctor Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/sharp 2496ms (cache revalidate d) npm timing idealTree:#root Completed in 2530ms npm timing idealTree:node_modules/sharp Completed in 0ms npm timing idealTree:buildDeps Completed in 2536ms npm timing idealTree:fixDepFlags Completed in 4ms npm timing idealTree Completed in 2745ms npm timing reify:loadTrees Completed in 2747ms npm timing reify:diffTrees Completed in 12ms npm timing reify:retireShallow Completed in 0ms npm timing reify:createSparse Completed in 0ms npm timing reify:loadBundles Completed in 0ms npm timing reify:unpack Completed in 1ms npm timing reify:unretire Completed in 0ms npm timing build:queue Completed in 0ms npm timing build:deps Completed in 2ms npm timing build Completed in 3ms npm timing reify:build Completed in 4ms npm timing reify:trash Completed in 0ms npm timing reify:save Completed in 70ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/ bulk 1076ms npm timing auditReport:getReport Completed in 1087ms npm timing auditReport:init Completed in 0ms npm timing reify:audit Completed in 1095ms npm timing reify Completed in 3889ms

up to date, audited 127 packages in 5s

14 packages are looking for funding run npm fund for details

found 0 vulnerabilities npm timing command:install Completed in 3914ms npm verb exit 0 npm timing npm Completed in 4613ms npm info ok

npm ls sharp

whatsapp-web@1.0.0 C:\Users\GeeiKa.com\whatsapp-web +-- sharp@0.29.3 -- whatsapp-web.js@1.15.3 -- sharp@0.28.3

npm ls -g sharp

C:\Users\GeeiKa.com\AppData\Roaming\npm `-- (empty)

lovell commented 2 years ago

@harisghulam New issue please - https://github.com/lovell/sharp/issues/new?assignees=&labels=installation&template=installation.md (and submit complete logs please, not partial)