Error yargs@17.1.1: The engine "node" is incompatible with this module

Auto deploy is failing. Nothing in the project has changed, and it was working 1 year ago the last time I made updates. Locally I can run the build command without errors. My local node version for this project is 10.15.3, which is even more confusing given what appears to be the error below.

When comparing the two deploy logs (working a year ago to not today) this is the main thing that sticks out to me in the one that isn’t working:
error yargs@17.1.1: The engine "node" is incompatible with this module. Expected version ">=12". Got "10.24.1"

So It looks like something in yargs probably changed, that made the build not work in this specific node environment. I guess my main question is why is it picking this specific node environment? Should I try and upgrade the node_env to 12? Or should I try and downgrade the version of yargs to whatever version of yargs it would have been installing a year ago? Googling this specific error hasnt brought me much luck surprisingly. Also very confused as to how the build works locally on node 10x but the error on deploy says i need to be on 12x at least.

Let me know if you would like a complete copy of both logs but pretty sure what i described is the root of the issue at this point.


Hi @ineptian

Yes, you will need to set the node version used in the build to v12 or higher. There are a few ways you can set this value as outlined in Manage Build Dependencies → Node.js and JavaScript. I would suggest updating to v14 at minimum as v12 will reach end of life in April this year (see here.)