first of all thanks for the help.
I have a Node js API REST, i use Express, fs module, sharp for images and many others, everything works fine in my machine, and i wanted to test this API in a shared hosting that i purchased months ago.
i have my app in my folder, the node js create app from CPANEL Recognizes my JSON file, when i click NPM INSTALL this is the error that comes up:
npm WARN lifecycle The node binary used for scripts is /home/webfoqgo/nodevenv/server/12/bin/node but npm is using /opt/alt/alt-nodejs12/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
ERR! sharp Use with glibc 2.12 requires manual installation of libvips >= 8.10.0
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
make: execvp: cc: Permission denied
make: *** [Release/obj.target/nothing/../node-addon-api/nothing.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 2.6.32-954.3.5.lve1.4.77.el6.x86_64
gyp ERR! command "/opt/alt/alt-nodejs12/root/usr/bin/node" "/opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/webfoqgo/nodevenv/server/12/lib/node_modules/sharp
gyp ERR! node -v v12.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/webfoqgo/.npm/_logs/2021-01-27T20_32_15_794Z-debug.log
i tried 2 things:
1.- i made a .npmrc file in my project root like this:
2.- i deleted the SHARP dependency from my package.json -- this makes the process of NPM INSTALL in cpanel go well, no error, but do need sharp in my project so deleting it is not a viable option for production.
Links that i have checked: StackOverflow question.
have anybody came across this sometime? Thank you very much.