winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.75k stars 186 forks source link

Cannot read properties of undefined (reading 'emailIdentities') #6626

Open eladcon opened 3 weeks ago

eladcon commented 3 weeks ago

I tried this:

https://github.com/winglang/wing/assets/1727147/a8afa5a1-2e7f-429e-82ba-b7db7683919d

bring cloud;
bring http;
bring ses;

pub class Email {
  new() {
    let sesClient = new ses.EmailService();
    new cloud.Function(inflight () => {
      let res = http.post("");
    });
  }
}

new Email();

BTW, surprisingly enough THIS WOKRS: (Notice I've commented out http.post("");)

bring cloud;
bring http;
bring ses;

pub class Email {
  new() {
    let sesClient = new ses.EmailService();
    new cloud.Function(inflight () => {
     // let res = http.post("");
    });
  }
}

new Email();

This happened:

Failed to compile.

Error: Cannot read properties of undefined (reading 'emailIdentities')
at new EmailService_tfaws /private/tmp/a4/node_modules/@winglibs/ses/tfaws.w:7:30

I expected this:

To compile.

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes