AWS_LAMBDA_JS_RUNTIME for netlify gatsby plugin rejects node14.x

hello, there was a compatibility problem when i tried to deploy Gatsby site with SSR using nodejs14.x for AWS lambda runtime. it shows an error stated Using an unsupported version of Node.js for functions: nodejs14.x. I search and noticed nodejs14.x is no longer supported in lambda. So I tried a higher version which is nodejs16.x, the build was fine without errors. but when i run a page with SSR it has a runtime error:

Error - The module '/var/task/client/gentek-www/.cache/query-engine/assets/prebuilds/linux-x64/node.abi83.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 93. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).

I thought the version was referring to NODE_VERSION env setting, but the version remains at 83 which meant nodejs14.x. but what i noticed is the node.abi83.node file indicated is from your plugin @netlify/plugin-gatsby that only has a specific version that is supported which is 83 (specified in repo in file plugin/src/helpers/files.ts - line 19-23):

const DEFAULT_LAMBDA_PLATFORM = 'linux'
const DEFAULT_LAMBDA_ABI = '83'
const DEFAULT_LAMBDA_ARCH = 'x64'

const LAMBDA_PLATFORM = `${DEFAULT_LAMBDA_PLATFORM}-${DEFAULT_LAMBDA_ARCH}`

Is there a way for you guys to still support the lambda runtime version nodejs14.x or make new binaries for node16.x/18.x/20.x for lambda? or are there other plugins to use aside from using @netlify/plugin-gatsby?

Steps to reproduce

  1. deploy a gatsby site in netlify with SSR page support using NODE_VERSION 14 and AWS_LAMBDA_JS_RUNTIME nodejs14.x
  2. you will see an error Using an unsupported version of Node.js for functions: nodejs14.x
  3. try deploying again but now using NODE_VERSION 16 and AWS_LAMBDA_JS_RUNTIME nodejs16.x
  4. successful build
  5. run the site, try the page with SSR
  6. error will be showing ‘…/linux-x64/node.abi83.node’ was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 93.’

Hi Jeffrey,

Thanks for getting in touch! We have some folks on the team looking into the issue you reported here, and we’re also tracking this fix internally. We’ll continue to follow up there once we have more insight!