https://pulumi.com logo
#general
Title
# general
r

rapid-eye-32575

07/16/2019, 12:39 PM
Hmm
CustomResource
-objects are broken for me with the current release (I'm using
v0.17.22
). I always get the following error:
Copy code
TypeError: opts.parent.__aliases is not iterable
        at new Resource ([...]/node_modules/@pulumi/pulumi/resource.js:117:51)
        at new CustomResource ([...]/node_modules/@pulumi/pulumi/resource.js:270:9)
        at new Resource ([...]/node_modules/@pulumi/pulumi/dynamic/index.js:40:9)
        at new DatabaseUser ([...]/src/database/database-user.ts:7:9)
        at [...]/src/database/gcp/gcp-database-cluster.ts:64:13
The instance of
GCPDatabaseCluster
(which has no aliases) is the parent of a
DatabaseUser
(again without aliases). Maybe this has something to do with the new feature of renaming resources (https://github.com/pulumi/pulumi/pull/2774)? Has anyone seen a similar behavior? The code still worked last week ago 🤔
w

white-balloon-205

07/16/2019, 1:50 PM
This is a bug - if you could open an issue to track, that would be great. I believe it will only happen if you have two different versions of
@pulumi/Pulumi
in your program, and the parent resource was using the older version while the child was using the newer. If you can update your versions to be consistent, I believe that would allow you to workaround this in the meantime.
r

rapid-eye-32575

07/16/2019, 2:06 PM
Hey @white-balloon-205, that's a great tip. I will try to see if any versions differ (though that was my first idea and I thought I did harmonize the version 😉 ). Should I still open a GitHub issue even if the cause is just version inconsistencies?
w

white-balloon-205

07/16/2019, 2:12 PM
Yes - an issue would still be useful so we can prevent this from being a problem even when there are mismatched versions.
r

rapid-eye-32575

07/16/2019, 2:15 PM
Alright, will create one then once I narrowed this down 👍
Hmm I somehow fixed it by deleting all
node_modules
-directories and running
yarn
again. Fixing the version inconsistencies in the
package.json
files and running
yarn
alone did not help 🤷
Here's the issue I created on that topic: https://github.com/pulumi/pulumi/issues/2938
w

white-balloon-205

07/16/2019, 6:19 PM
Thanks. This is fixed now with https://github.com/pulumi/pulumi/pull/2942.
r

rapid-eye-32575

07/17/2019, 8:02 AM
Wow, that was fast 🙂
2 Views