Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing from Node14.x vs Node21.x then "TSError: ⨯ Unable to compile TypeScript:" #11

Open
NealWalters opened this issue Apr 7, 2024 · 1 comment

Comments

@NealWalters
Copy link

This is such a great example you put together, anxious to get it implemented!

First error on "pulumi up"

 aws:lambda:Function (post-confirmation-fn):
    error: 1 error occurred:
        * error creating Lambda Function (1): InvalidParameterValueException: The runtime parameter of **nodejs14.x** is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs20.x) while creating or updating functions.
    {
      RespMetadata: {
        StatusCode: 400,
        RequestID: "bd01d1cb-9897-456f-89ab-2e75ea03f432"
      },
      Message_: "The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs20.x) while creating or updating functions.",
      Type: "User"
    }

So installed Node 21.7 and searched for NodeJs14 in all files, changing 'nodejs14.x' to 'nodejs21.x'

Then got this error:


     Type                 Name                                           Plan     Info
     pulumi:pulumi:Stack  serverless-aws-react-saas-saasTemplateBackend           1 error
Diagnostics:
  pulumi:pulumi:Stack (serverless-aws-react-saas-saasTemplateBackend):
    error: Running program 'C:\GitHub\SimonHoiberg-Saas-Template\saas-template-main\back-end/' failed with an unhandled exception:
    TSError: ⨯ Unable to compile TypeScript:
    resources/pulumi/resolvers/get-cognito-user/source.ts(12,5): error TS2322: Type '"nodejs21.x"' is not assignable to type '"dotnetcore2.1" | "dotnetcore3.1" | "dotnet6" | "go1.x" | "java8" | "java8.al2" | "java11" | "ruby2.5" | "ruby2.7" | "nodejs10.x" | "nodejs12.x" | "nodejs14.x" | "python2.7" | ... 5 more ... | undefined'.

Thanks,
Neal

@NealWalters
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant