pulumi / pulumi-aws-apigateway

Apache License 2.0
10 stars 5 forks source link

API Gateway Example Code Doesn't Work #71

Closed mivtachyahu closed 1 year ago

mivtachyahu commented 1 year ago

What happened?

Using the simple api gateway example code, when I try and run a pulumi up I get the following error:

` error: Error serializing '(ev, ctx) => __awaiter(void 0, void ...': index.ts(15,14)

'(ev, ctx) => __awaiter(void 0, void  ...': index.ts(15,14): which could not be serialized because
  Could not find [[Scopes]] property

Function code:
  (ev, ctx) => __awaiter(void 0, void 0, void 0, function* () {
          console.log(JSON.stringify(ev));
          return {
              statusCode: 200,
              body: "goodbye",
  ...`

Steps to reproduce

Take the simple api gateway example typescript code. Run an npm install. Run a pulumi up. See the above error.

Expected Behavior

Create a stack with an api gateway.

Actual Behavior

I get the error as posted above

Output of pulumi about

CLI Version 3.49.0 Go Version go1.19.4 Go Compiler gc

Plugins NAME VERSION aws 5.24.0 aws-apigateway 1.0.1 nodejs unknown

Host OS darwin Version 12.6 Arch arm64

This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v19.3.0'

Backend Name pulumi.com URL https://app.pulumi.com/MatthewBrownOlio User MatthewBrownOlio Organizations MatthewBrownOlio, OLIOEX

Dependencies: NAME VERSION @pulumi/aws-apigateway 1.0.1 @pulumi/aws 5.24.0 @pulumi/pulumi 3.49.0 @types/node 10.17.60

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

danielrbradley commented 1 year ago

Please could you link to exactly which example you're using here - is this from the https://github.com/pulumi/examples repo or in the examples folder within this repo or using pulumi new?

Also, is this written using typescript?

What version of nodejs are you using?

mivtachyahu commented 1 year ago

Version of NodeJS was the issue here: Closing this ticket: a duplicate of https://github.com/pulumi/pulumi/issues/11488