sharp
sharp copied to clipboard
Something went wrong installing the "sharp" module error
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

my package.json

how can i pix this bug?
That looks like AWS Lambda, did you see https://sharp.pixelplumbing.com/en/stable/install/#aws-lambda ?
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
ok i pix it i set lambda nodjes version 8.10 but sharp need 10.x version
I tried the suggestion in the above link and got the following:
$ npm install --arch=x64 --platform=linux --target=10.15.0 sharp
> [email protected] 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