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

Something went wrong installing the "sharp" module error #1819

Closed
kunka7 opened this issue Jul 31, 2019 · 4 comments
Closed

Something went wrong installing the "sharp" module error #1819

kunka7 opened this issue Jul 31, 2019 · 4 comments
Labels

Comments

@kunka7
Copy link

kunka7 commented Jul 31, 2019

hello lovell, first your module is great but this bug make me sad
i already check other same Issues but these not helped to me
Error
image

my package.json
image

how can i pix this bug?

@lovell
Copy link
Owner

lovell commented Jul 31, 2019

That looks like AWS Lambda, did you see https://sharp.pixelplumbing.com/en/stable/install/#aws-lambda ?

@kunka7
Copy link
Author

kunka7 commented Jul 31, 2019

yes its lambda and i already see that link before and i installed sharp module linux version so i need other solution plz help me

@kunka7
Copy link
Author

kunka7 commented Aug 1, 2019

ok i pix it i set lambda nodjes version 8.10 but sharp need 10.x version

@kunka7 kunka7 closed this as completed Aug 1, 2019
@scottw-finao
Copy link

I tried the suggestion in the above link and got the following:

$ npm install --arch=x64 --platform=linux --target=10.15.0 sharp

> sharp@0.23.0 install /home/scottw/src/imageresize/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module './index'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/scottw/src/imageresize/node_modules/.bin/rc:2:10)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
gyp: name 'enable_lto' is not defined while evaluating condition 'enable_lto=="true"' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Linux 4.15.0-62-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/scottw/src/imageresize/node_modules/sharp
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 

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

No branches or pull requests

3 participants