Code Monkey home page Code Monkey logo

Comments (5)

bensebborn avatar bensebborn commented on July 17, 2024 1

All you need to do is change the version of lambda-node.

In your package.json change

"node-lambda": "0.16.0"

to

"node-lambda": "1.3.0"

from lambda-cloudwatch-slack.

AustinAMeyer avatar AustinAMeyer commented on July 17, 2024

Here is the error message:
The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.
=> Retrying
InvalidParameterValueException: The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.

from lambda-cloudwatch-slack.

anil-venkata avatar anil-venkata commented on July 17, 2024

I solved it by following these steps , may be the hacky way.

  1. Install node 18 in your local
  2. remove the package-lock.json (not really required, for the sake of it i did)
  3. run npm install
  4. go to this folder cd ./node_modules/node-lambda/bin/
  5. Open the file in your favourite text editor and replace the line const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs12.x' to const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs18.x' , save the file
  6. go to root dir of this repo and run the command npm run deploy

And it worked for me

from lambda-cloudwatch-slack.

dhanvi avatar dhanvi commented on July 17, 2024

Setting the below in .env did the trick for me.

AWS_RUNTIME=nodejs18.x

from lambda-cloudwatch-slack.

HieronyM avatar HieronyM commented on July 17, 2024

I got this error after try to deploy it on node18 & node20

{
  "errorType": "TypeError",
  "errorMessage": "Cannot read properties of undefined (reading '0')",
  "trace": [
    "TypeError: Cannot read properties of undefined (reading '0')",
    "    at processEvent (/var/task/index.js:359:43)",
    "    at exports.handler (/var/task/index.js:418:5)",
    "    at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1173:29)"
  ]
}

from lambda-cloudwatch-slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.