I am using sharp to convert images to webp (project developped with angular + nodejs), it works only localy because i have error when i deploy using Cpanel (nodejs apps), i checked with different versions (latest 0.31.1, 0.27.0 and also 0.23.0 ..). I can install sharp if only i remove it from dependencies :
"dependencies": {
"sharp": "^0.27.0"
Have you any idea ? Thanks.
Here is error :
npm WARN lifecycle The node binary used for scripts is /home/xxx/nodevenv/nodejs_test/10/bin/node but npm is using /opt/alt/alt-nodejs10/root/usr/bin/node itself. Use the --scripts-prepend-node-path
option to include the path for the node binary ....
Here is my package.json :
{
"name": "mysqlproject",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"sharp": "^0.27.0",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"file": "^0.2.2",
"material-icons": "^0.6.1",
"multer": "^1.4.4",
"mysql": "^2.18.1",
"node-fetch": "^3.2.3",
"nodemailer": "6.6.3",
"nodemon": "^2.0.7",
"request": "^2.88.2",
"typeface-open-sans": "^1.1.13",
"typeface-roboto": "^1.1.13"
},
"browser": {
"fs": false,
"path": false,
"os": false,
"crypto": false
}
}