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

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

Closed
1intan99 opened this issue Dec 8, 2021 · 6 comments
Closed

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

1intan99 opened this issue Dec 8, 2021 · 6 comments

Comments

@1intan99
Copy link

1intan99 commented Dec 8, 2021

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:

  • Install with the --verbose flag and look for errors: "npm install --ignore-scripts=false --verbose sharp"
  • Install for the current runtime: "npm install --platform=win32 --arch=x64 sharp"
  • Consult the installation documentation: https://sharp.pixelplumbing.com/install
    at Object. (D:\MeeS\Development\MeeS-Dev\node_modules\sharp\lib\sharp.js:30:9)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (D:\MeeS\Development\MeeS-Dev\node_modules\sharp\lib\constructor.js:8:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    [nodemon] app crashed - waiting for file changes before starting...
@lovell
Copy link
Owner

lovell commented Dec 8, 2021

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
Copy link
Author

1intan99 commented Dec 8, 2021

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

Cause i need canvas for discord bot leveling profile

@lovell
Copy link
Owner

lovell commented Dec 8, 2021

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
Copy link
Author

1intan99 commented Dec 8, 2021

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

@lovell lovell closed this as completed Dec 8, 2021
@harisghulam

This comment has been minimized.

@lovell
Copy link
Owner

lovell commented Dec 21, 2021

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

Repository owner locked and limited conversation to collaborators Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants