My stack runs perfectly from local, but when runni...
# typescript
a
My stack runs perfectly from local, but when running inside GitHub actions, gives TS compilation error from ts-node "error TS2339: Property 'name' does not exist on type 'Promise<GetZoneResult>'" Is it due to some difference in node version?
b
This suggests you are running a different Pulumi version
We removed sync invokes in 2.0
@acceptable-stone-35112
a
strange - I updated to 2.0 on the day it was released
you mean different version in GitHub actions?
I'm using 2.1.0 in all projects
b
What does the code look like around your GetZoneResult?
a
const zone = route53.getZone({ name: config.apiDomainName });
then I pass zone.name and zone.id as Input<string> params to other ComponentResource
b
Yeah that disappeared in 2.0
Now you will have to wrap it in Pulumi.output
As per that article and typescript example
a
I see. Then how come it works locally?
b
The fact this works is 100% because of an older version of Pulumi
Maybe something in Pqckage-lock or node_modules
a
"@pulumi/pulumi": {             "version": "1.13.1",
seems you're right - I have this in package lock
though in package.json I have {     "name": "backend-stacks",     "devDependencies": {         "@types/node": "^10.0.0"     },     "dependencies": {         "@pulumi/pulumi": "^2.0.0",         "@pulumi/aws": "^2.0.0",         "@pulumi/awsx": "^0.20.0"     } }
b
Yeah this suggests that even though you updated package.json, you never actually upgraded the node modules that it uses
Like reran npm install
You will see the error in GitHub Actions as that creates the environment fresh each time
a
Got you. Thanks!
b
Hope it helps :)
a
basically I just wrapped it in a promise route53.getZone({ name: config.apiDomainName }).then(zone => {})
b
works perfectly 🙂