1๐
I resolved this issue using yarn install instead of npm.
Yarn is better to solve dependency issues than npm.
Its step is like following.
When you login with your account in vercel, you can go to Setting/General/Build & Development Settings.
Setting/General/Build & Development Settings
You can see 4 input fields that was set disabled there.
Please active override the 3rd one called Install Command
and input yarn install
.
And click save button.
And try to redeploy in the deployments page.
Normally, it will be solved normal dependency issues.
In my case, still happened the build error related gyp.
I guess it will be related to node and node-sass version.
We can also change the node version in the vercel.
Go to Setting/General/Node.js version.
You can see node version of your website.
Node version setting
In my case, node version was 18 and node-sass version in the package.json was 5.0.0.
So, they didnโt match each other.
I changed the node as 16.x and node-sass updated as 6.0.0
And deployed again.
Ya!. it works.
Deployment successfully