sst: Error: Expected runtime to be one of ["nodejs", "nodejs6.10"], got nodejs 22.x

I get this error when running bunx sst dev on a fresh nextjs 15 app:

SST 3.3.44  ready!

➜  App:        ai-christmas-photos
   Stage:      lewiscarhart
   Console:    https://console.sst.dev/local/ai-christmas-photos/lewiscarhart

~  Deploy

|  Created     christmasphotos sst:aws:Nextjs → christmasphotosDevServerCode aws:s3:BucketObjectv2
|  Error       christmasphotosDevServerFunction aws:lambda:Function
|  aws:lambda/function:Function resource 'christmasphotosDevServerFunction' has a problem: expected runtime to be one of ["nodejs" "nodejs4.3" "nodejs6.10" "nodejs8.10" "nodejs10.x" "nodejs12.x" "nodejs14.x" "nodejs16.x" "java8" "java8.al2" "java11" "p
ython2.7" "python3.6" "python3.7" "python3.8" "python3.9" "dotnetcore1.0" "dotnetcore2.0" "dotnetcore2.1" "dotnetcore3.1" "dotnet6" "dotnet8" "nodejs4.3-edge" "go1.x" "ruby2.5" "ruby2.7" "provided" "provided.al2" "nodejs18.x" "python3.10" "java17" "rub
y3.2" "ruby3.3" "python3.11" "nodejs20.x" "provided.al2023" "python3.12" "java21" "python3.13"], got nodejs22.x. Examine values at 'christmasphotosDevServerFunction.runtime'.

✕  Failed
   christmasphotosDevServerFunction aws:lambda:Function
   aws:lambda/function:Function resource 'christmasphotosDevServerFunction' has a problem: expected runtime to be one of ["nodejs" "nodejs4.3" "nodejs6.10" "nodejs8.10" "nodejs10.x" "nodejs12.x" "nodejs14.x" "nodejs16.x" "java8" "java8.al2" "java11" "p
ython2.7" "python3.6" "python3.7" "python3.8" "python3.9" "dotnetcore1.0" "dotnetcore2.0" "dotnetcore2.1" "dotnetcore3.1" "dotnet6" "dotnet8" "nodejs4.3-edge" "go1.x" "ruby2.5" "ruby2.7" "provided" "provided.al2" "nodejs18.x" "python3.10" "java17" "rub
y3.2" "ruby3.3" "python3.11" "nodejs20.x" "provided.al2023" "python3.12" "java21" "python3.13"], got nodejs22.x. Examine values at 'christmasphotosDevServerFunction.runtime'.


|  Error

Downgrading to SST 3.3.44 works okay:

SST 3.3.38  ready!

➜  App:        ai-christmas-photos
   Stage:      lewiscarhart
   Console:    https://console.sst.dev/local/ai-christmas-photos/lewiscarhart

~  Deploy

|  Created     christmasphotos sst:aws:Nextjs → christmasphotosDevServerCode aws:s3:BucketObjectv2
|  Created     christmasphotos sst:aws:Nextjs → christmasphotosDevServerFunction aws:lambda:Function (5.8s)
|  Deleted     ai-christmas-photosDevServer sst:aws:Function → ai-christmas-photosDevServerCode aws:s3:BucketObjectv2
|  Deleted     xphotosDevServer sst:aws:Function → xphotosDevServerCode aws:s3:BucketObjectv2
|  Deleted     ai-christmas-photosDevServer sst:aws:Function → ai-christmas-photosDevServerLogGroup aws:cloudwatch:LogGroup
|  Deleted     xphotosDevServer sst:aws:Function → xphotosDevServerLogGroup aws:cloudwatch:LogGroup
|  Deleted     ai-christmas-photosDevServer sst:aws:Function → ai-christmas-photosDevServerRole aws:iam:Role
|  Deleted     xphotosDevServer sst:aws:Function → xphotosDevServerRole aws:iam:Role
|  Deleted     xphotos sst:aws:Nextjs → xphotosDevServer sst:aws:Function
|  Deleted     ai-christmas-photos sst:aws:Nextjs → ai-christmas-photosDevServer sst:aws:Function
|  Deleted     aichristmasphotos sst:aws:Nextjs → aichristmasphotosDevServer sst:aws:Function
|  Deleted     xphotos sst:aws:Nextjs
|  Deleted     aichristmasphotos sst:aws:Nextjs
|  Deleted     ai-christmas-photos sst:aws:Nextjs
|  Deleted     christmasphotos sst:aws:Nextjs → christmasphotosDevServerCode aws:s3:BucketObjectv2

✓  Complete

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

Starting v3.3.62, SST CLI will error if user-pinned provider version is lower than that required by SST.

And when the provider version is not pinned, SST’s version is used.

Oh i think i know why… can you confirm the AWS provider version is pinned in your sst.config.ts?