aws-samples / amazon-textract-serverless-large-scale-document-processing

Process documents at scale using Amazon Textract
Apache License 2.0
331 stars 165 forks source link

NodeJs 10.17.5 not supported anymore #35

Closed khaledbaghdadii closed 2 years ago

khaledbaghdadii commented 2 years ago

The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions

package.json "@types/node": "10.17.5"

package-lock.json "@types/node": { "version": "10.17.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.5.tgz", "integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==", "dev": true }

superconnect commented 2 years ago

I am a newbie trying to deploy this architecture. How would I go about updating the nodejs14.x?

acidack commented 2 years ago

Updating the package.json to this, helped me fix this.

{
  "name": "textract-pipeline",
  "version": "0.1.0",
  "bin": {
    "textract-pipeline": "bin/textract-pipeline.js"
  },
  "scripts": {
    "build": "tsc",
    "watch": "tsc -w",
    "test": "jest",
    "cdk": "cdk"
  },
  "devDependencies": {
    "@aws-cdk/assert": "1.133.0",
    "@types/jest": "^24.0.22",
    "@types/node": "10.17.5",
    "jest": "^26.6.3",
    "aws-cdk": "1.133.0",
    "ts-node": "^8.1.0",
    "typescript": "~3.7.2"
  },
  "dependencies": {
    "@aws-cdk/aws-dynamodb": "^1.133.0",
    "@aws-cdk/aws-events-targets": "^1.133.0",
    "@aws-cdk/aws-lambda": "^1.133.0",
    "@aws-cdk/aws-lambda-event-sources": "^1.133.0",
    "@aws-cdk/aws-sns": "^1.133.0",
    "@aws-cdk/aws-sns-subscriptions": "^1.133.0",
    "@aws-cdk/aws-sqs": "^1.133.0",
    "@aws-cdk/core": "1.133.0",
    "source-map-support": "^0.5.16"
  }
}
khaledbaghdadii commented 2 years ago

This solution worked with me as well. I just had to uninstall aws-cdk and reinstall due to Cloud assembly schema version mismatch I followed these steps to install and reinstall aws-cdk

$ npm uninstall -g aws-cdk 
$ npm install -g aws-cdk
superconnect commented 2 years ago

Thank you that worked perfectly! Now I need to find out where the textrac output goes when Processing incoming documents

tytx commented 2 years ago

Hello there, have changed "@types/node": "10.17.5", to 14.x.x but it still output " node 10.x" error due to bucket notifications when deploying stack