https://pulumi.com logo
a

acceptable-stone-35112

05/11/2020, 2:16 PM
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

broad-dog-22463

05/11/2020, 2:19 PM
This suggests you are running a different Pulumi version
We removed sync invokes in 2.0
@acceptable-stone-35112
a

acceptable-stone-35112

05/11/2020, 2:22 PM
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

broad-dog-22463

05/11/2020, 2:24 PM
What does the code look like around your GetZoneResult?
a

acceptable-stone-35112

05/11/2020, 2:25 PM
const zone = route53.getZone({ name: config.apiDomainName });
then I pass zone.name and zone.id as Input<string> params to other ComponentResource
b

broad-dog-22463

05/11/2020, 2:27 PM
Yeah that disappeared in 2.0
Now you will have to wrap it in Pulumi.output
As per that article and typescript example
a

acceptable-stone-35112

05/11/2020, 2:28 PM
I see. Then how come it works locally?
b

broad-dog-22463

05/11/2020, 2:29 PM
The fact this works is 100% because of an older version of Pulumi
Maybe something in Pqckage-lock or node_modules
a

acceptable-stone-35112

05/11/2020, 2:31 PM
"@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

broad-dog-22463

05/11/2020, 2:35 PM
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

acceptable-stone-35112

05/11/2020, 2:43 PM
Got you. Thanks!
b

broad-dog-22463

05/11/2020, 2:46 PM
Hope it helps :)
a

acceptable-stone-35112

05/11/2020, 3:05 PM
basically I just wrapped it in a promise route53.getZone({ name: config.apiDomainName }).then(zone => {})
b

broad-dog-22463

05/11/2020, 3:48 PM
works perfectly 🙂