Jett Robin Andres
11/24/2021, 11:59 PMstacks/index.ts
the set default function runtime for nodeJs is just nodeJs12.x
, is this the one causing the error?
Other stackoverflow answers and github comments recommend updating my @types/node
dependency but that still didn’t do the trick.
I checked my SST version and it’s (a bit?) outdated since I started.
SST: 0.45.0
CDK: 1.125.0
In SST v0.46.0’s changelog, there was a PR related to removal of the said node crypto package. Will updating to v0.46.0
most likely solve my case? How do we go about updating SST? Would you guys recommend me to jump immediately to v0.53.0
or just go about it incrementally? I’m missing out on all the good stuff too so I figured maybe it’s about time while my SST app’s still youngÖmer Toraman
11/25/2021, 10:36 AMKeyObject
and see if it is undefined
or not?Ömer Toraman
11/25/2021, 10:40 AMsst.json
and setting typeCheck
to false
, so it will not error ourÖmer Toraman
11/25/2021, 10:41 AMÖmer Toraman
11/25/2021, 10:41 AMÖmer Toraman
11/25/2021, 10:42 AMJett Robin Andres
11/25/2021, 10:42 AMÖmer Toraman
11/25/2021, 10:43 AMÖmer Toraman
11/25/2021, 10:44 AMCryptoKey
Ömer Toraman
11/25/2021, 10:44 AMÖmer Toraman
11/25/2021, 10:44 AMÖmer Toraman
11/25/2021, 10:44 AMJett Robin Andres
11/25/2021, 10:44 AMÖmer Toraman
11/25/2021, 10:46 AMÖmer Toraman
11/25/2021, 10:46 AMÖmer Toraman
11/25/2021, 10:46 AMJett Robin Andres
11/25/2021, 10:47 AMJett Robin Andres
11/25/2021, 10:47 AMimport { CognitoJwtVerifier } from "aws-jwt-verify"
Jett Robin Andres
11/25/2021, 10:49 AMnpx sst start
first and then adding my import code and saving afterÖmer Toraman
11/25/2021, 10:49 AMÖmer Toraman
11/25/2021, 10:49 AMÖmer Toraman
11/25/2021, 10:50 AMÖmer Toraman
11/25/2021, 10:50 AMÖmer Toraman
11/25/2021, 10:51 AMyarn remove @types/node
Add this:
yarn add -D @types/node@"<15.0.0"
But better to create a new SST app with the latest version (it is already v14 with the appropriate @types/node)Jett Robin Andres
11/25/2021, 10:52 AMÖmer Toraman
11/25/2021, 10:52 AMFrank
Frank
Jett Robin Andres
11/26/2021, 12:07 PMnodejs14.x
(see first screenshot) and I’m glad to see that my lambdas were still working properly. phew.
I installed @types/node
as suggested by @Ömer Toraman via
npm i @types/node@"<15.0.0"
buuut the problem still persisted though haha. I have yet to try the library on a fresh SST project!Jett Robin Andres
11/26/2021, 12:17 PM@types/node@"^16.11.10'
and the error’s finally gone!Ömer Toraman
11/26/2021, 2:54 PM