CDK Deploy fails due to nodejs12.x dependency in cdk-dynamo-table-viewer
Closed this issue · 3 comments
Describe the bug
CDK Deploy fails on this step: https://cdkworkshop.com/20-typescript/50-table-viewer/500-deploy.html.
This is due to setting the library version to npm install cdk-dynamo-table-viewer@0.2.0
Expected Behavior
Expected CDK deploy to just deploy
Current Behavior
Error is Resource handler returned 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.
Reproduction Steps
Install 0.2.0 version of cdk-dynamo-table-viewer and walk through workshop.
https://cdkworkshop.com/20-typescript/50-table-viewer/200-install.html
Possible Solution
When I run just npm install cdk-dynamo-table-viewer
instead of version lock to 0.2.0 then cdk deploy works.
Additional Information/Context
No response
CDK CLI Version
2.82.0 (build 3a8648a)
Section
Using construct libraries
Browser
No response
Language
TypeScript
I also got one error at this stage.
TypeError: Cannot read property 'name' of undefined
at new Function (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/node_modules/aws-cdk-lib/aws-lambda/lib/function.js:1:5430)
at new TableViewer (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/node_modules/cdk-dynamo-table-viewer/src/table-viewer.ts:48:21)
at new CdkWorkshopStack (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/lib/cdk-workshop-stack.ts:25:5)
at Object.<anonymous> (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/bin/cdk-workshop.ts:6:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Module.m._compile (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Object.require.extensions.<computed> [as .ts] (/mnt/d/Personal/code/vscode/CDK-Amstack/cdk-workshop/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
⚠️ COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.