Im still facing this error, as far as i Have seen ...
# getting-started
b
Im still facing this error, as far as i Have seen is a typescript error, i have done it all to try and resolve it, but still havent been able to
m
Hi Byron — which version of awsx are you using (eg in package.json)?
b
Hi!
Copy code
{
  "name": "NewPulumi",
  "main": "index.ts",
  "devDependencies": {
    "@types/node": "^14"
  },
  "dependencies": {
    "@pulumi/aws": "^5.27.0",
    "@pulumi/awsx": "^1.0.1",
    "@pulumi/pulumi": "^3.51.1"
  }
}
m
Ok yeah. This API (
awsx.apigateway.API
) is from a previous (pre-1.0) version of AWSx — for example here, which is using that API (via ^0.40.0): https://github.com/pulumi/examples/blob/e2e5eb426dbf5b57c50bba0f8eb54fe982ceddb1/aws-ts-apigateway/index.ts#L18
b
Well, it resolved the issue!
However, this is not for awsx, is for aws, but, as you were saying, if i downgrade the version of @pulumi/awsx to one lower than 1.0, Should it work?
m
Actually, perhaps an alternative: I believe if you change that reference to
awsx.classic.apigateway.API
, that might work for you?
I haven’t spent much time with the 1.0 package yet, but it looks like
classic
may bring forward the APIs that were there pre-1.0
b
I see
m
image.png
(Ideally you wouldn’t downgrade, because you’d essentially be stuck in a pre-1.0 world.)
This is probably the way to go if you’d prefer not install aws-apigateway.
b
I see, thanks a lot!
One question
Just to know
Copy code
error: Error serializing '(event) => __awaiter(void 0, void 0, ...': index.ts(35,26)
This one is related to packages ?
m
That I haven’t seen — looks maybe related to the code you’re attempting to serialize (for example as your Lambda event handler)?