1

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 .

V2rson
  • 137
  • 1
  • 10

2 Answers2

2

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.
Aaron Stuyvenberg
  • 3,437
  • 1
  • 9
  • 21
1

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 .

V2rson
  • 137
  • 1
  • 10