Error: Found `engines` in `package.json` with an invalid Node.js version range: "16.x". Please set "engines": { "node": "12.x" } in your `package.json` file to upgrade to Node.js 12

Hello, I am trying to deploy my project to Vercel, after npx vercel I get this error message
“Error: Found engines in package.json with an invalid Node.js version range: “16.x”.
Please set “engines”: { “node”: “12.x” } in your package.json file to upgrade to Node.js 12.”

which does not make sense to me because it seems like the 12.x version is disabled in Vercel

Once I update the package to { “node”: “12.x” } I then get this error after running npx vercel:
Error: Command “npm run build” exited with 1

The build also gives me these warnings:
WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: Errors | Vercel Docs
12:04:43.813 > Installing Builder: @frontity/now
12:04:47.171 WARN! npm WARN deprecated @now/node-bridge@1.3.1: “@now/node-bridge” is deprecated and will stop receiving updates January 2021. Please use “@vercel/node-bridge” instead.

and errors:
isModuleDeclaration has been deprecated, please migrate to isImportOrExportDeclaration
12:05:05.075 at isModuleDeclaration (/vercel/path1/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
12:05:05.075 at PluginPass.Program (/vercel/path1/node_modules/babel-plugin-lodash/lib/index.js:102:44)

I have the same Problem! I need this compile with node 16

I’m also getting this exact same issue. Anyone find a solution yet?

Ok found a solution - not ideal but was in a pinch. Implemented what was mentioned in this thread:

In packages.json updated node to “12.x”

below updated build to “NODE_OPTIONS=–openssl-legacy-provider frontity build”

Should work as long as you’re running node 17 or above where the above node_option was introduced