Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node engine version problem when deploying to vercel

So I had a nextjs project deployed to vercel, and today I committed a minor change that was deleting some console log statements and it wouldn't deploy anymore. It is throwing this error:

picture of error

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.19.0" error Found incompatible module.

I think it is because that ipfs-unixfs file needs node version 16+ but vercel only works with 14.x. What can I do to fix it?. Node only handles version 12.x and 14.x

like image 386
Fred Prat Avatar asked Sep 04 '26 17:09

Fred Prat


2 Answers

Currently, Vercel only supports node.js 12.x and 14.x - try using this treat suggestion: https://github.com/vercel/vercel/issues/1078#issuecomment-433377209

  1. Add this file to the main project

.yarnrc

and add any flag to it.

  1. like:

--install.ignore-engines true

like image 62
jorkby Avatar answered Sep 06 '26 19:09

jorkby


You need to update the Node version that Vercel is using for your project's build step. This can be easily done in the project settings. As described in the Vercel Changelog, go to your project on your Vercel dashboard, click Settings, and scroll down a bit until you find the Node.js Version dropdown option. Select 16.x and redeploy your latest deployment. This worked for me.

like image 26
jdshaeff Avatar answered Sep 06 '26 20:09

jdshaeff