I used to use a Node.js v16.x installed locally to run Strapi which worked well.
But recently I had to update it to Node.js v18.x due to another project, so I installed NVM to manage multiple Node.js versions on my PC - and now I want to use Strapi with the new Node.js but I can't even start the develop mode anymore. There's a problem with the packge Sharp.
I'm not sure weather the issue with the package Sharp started because of the new Node version or NVM. As the Node installed (v18.17.0) is listed as compatible on Shap package npm page (here), I guess the problem is with NVM.
nvm list
* 18.17.0 (Currently using 64-bit executable)
16.14.2
My dependencies:
"dependencies": {
"@strapi/plugin-i18n": "4.16.2",
"@strapi/plugin-users-permissions": "4.16.2",
"@strapi/provider-email-amazon-ses": "4.16.2",
"@strapi/provider-upload-aws-s3": "4.16.2",
"@strapi/strapi": "4.16.2",
"@strapi/utils": "4.16.2",
"pg": "8.11.3",
"reach": "1.0.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "5.2.0",
"sharp": "^0.33.1",
"slugify": "1.6.6",
"strapi-plugin-config-sync": "1.2.3",
"strapi-plugin-email-designer": "2.2.1",
"strapi-plugin-entity-relationship-chart": "4.14.6",
"strapi-plugin-import-export-entries": "1.23.1",
"strapi-plugin-notes": "1.1.2",
"strapi-plugin-placeholder": "4.4.0",
"strapi-plugin-publisher": "1.5.6",
"styled-components": "5.2.1"
},
"engines": {
"node": ">=14.x.x <=18.x.x",
"npm": ">=6.0.0"
}
I've already tried to run the commands suggested on log (attached below) but nothing worked.
Does anyone know how to fix it?

I was not able to fix it, not sure if it's something wrong with the sharp latest version 0.33.1 (that I had updated on my project).
I even tried to run the Strapi with Docker on a Linux image (
node:18-alpine) but that issue still happen:The only solution was to downgrade to the previous version I was using (0.32.6), then it's working again.