i am getting Warning: found unsupported runtime 'nodejs18.x' for function 'rs-ms-v1' × Unsupported runtime

4.5k Views Asked by At

i tried to update my application from node 16 to node 18 and after completing my changes versions i started my app and sent a api call and i received following output .

Warning: found unsupported runtime 'nodejs18.x' for function 'rs-ms-v1'
× Unsupported runtime

we are using serverless.yml file

my serverless library version is 3.33.0 i checked the aws documentation lambda functions started to support nodejs18.x

please attach your solutions below .

3

There are 3 best solutions below

1
Aaron Stuyvenberg On BEST ANSWER

Nodejs18.x has been supported since version 3.25.0, so there are a couple things to check:

  1. Inside your project directory, run serverless --version to ensure that you're not overriding a global installation of serverless framework with an older one inside the project.
  2. Double check any plugins you're using to verify this error is not being returned by a plugin. It sounds like you may be running a local emulator to execute your function (like serverless-offline), which also may need to be updated.
  3. Share logs from CloudWatch if this problem persists.
0
V2rson On

so i found the answer so i updated the serverless library but i did not updated the serverless-offline library , due to that we are getting this error. latest serverless versions are supporting nodejs18.x .in order to use serverless please update all the packages related to serverless .

0
Abdennour TOUMI On
  1. Upgrade the serverless CLI
curl -o- -L https://slss.io/install | bash
# validate
sls --version
  1. uninstall & re-install last version of serverless-offline
npm uninstall serverless-offline --save-dev
npm i serverless-offline --save-dev