https://pulumi.com logo
#typescript
Title
# typescript
l

little-cartoon-10569

08/11/2020, 2:26 AM
I've just upgraded from 2.7.1 to 2.8.2, including binaries (via the nodejs Docker image) and npm packages. I'm now having problems with security group rules. Two of the error messages I get are
Type 'OutputInstance<number>' is missing the following properties from type 'OutputInstance<number>': apply, get
and
'import("/pulumi/projects/node_modules/@pulumi/pulumi/index").OutputInstance<number>' is not assignable to type 'import("/pulumi/projects/node_modules/@pulumi/pulumi/output").OutputInstance<number>'.
I deleted my node_modules and ran
npm install
and
npm upgrade
. Any other suggestions?
It's specifically awsx SecurityGroupRules that have the problem.
f

faint-table-42725

08/11/2020, 2:48 AM
This looks like a SxS issue anytime I’ve seen that type of error message. Can you check your
package-lock.json
to see if you’re bringing in two copies of
@pulumi/pulumi
somehow?
Though, maybe not now that I read the sources more closely in that it’s from the same module…
l

little-cartoon-10569

08/11/2020, 3:03 AM
No duplicates that I can see.
All the errors eventually lead back to either awsx.ec2.TcpPorts or awsx.ec2.UdpPorts.. if that helps...
Hmm, almost certainly not related but I seem to be dependedent on both versions 2.9.2 and 2.13.1 of Pulumi resource-aws.
I'll hunt that down, see if it leads anywhere
f

faint-table-42725

08/11/2020, 3:24 AM
As a quick check, you could try to use resolutions to force those versions to be the same
l

little-cartoon-10569

08/11/2020, 3:26 AM
I think I'd rather figure out why 2.9.1 is needed (it wasn't 2.9.2, my typo).
I can't figure it out. It turns out it doesn't need plugin resource aws 2.13.1 at all: I can install it, but it's not used, even though I'm using npm package @pulumi/aws 2.13.1. If I remove both 2.9.1 and 2.13.1, then run
pulumi preview
, it installs plugin aws 2.9.1. Where is this configured? I want to rule out that this is related to the mismatched OutputInstance definitions...
f

faint-table-42725

08/11/2020, 4:08 AM
I doubt the plugin is related since you’re not bringing in two different version of the
@pulumi/aws
package
That’s likely happening because the state file contains information about the version of the provider used
l

little-cartoon-10569

08/11/2020, 4:10 AM
Ah right, so would that go away if I updated the relevant resources? I wonder how I found out which ones they are... Does the pulumi/aws package not depend on the pulumi/pulumi one? Would that offer an explanation as to how I have 2 versions of OutputInstance?
f

faint-table-42725

08/11/2020, 4:36 AM
@pulumi/aws
does depend on
@pulumi/pulumi
but the version is marked as
^2.0.0
so it should pull in the same version as the one you’ve explicitly declared in your
package.json
typically
there were some cases where you could pull in 1.x via something like
@pulumi/awsx
with a mismatched version of
@pulumi/aws
but recent versions of
@pulumi/awsx
switched to using peer dependencies to try to avoid that from happening
l

little-cartoon-10569

08/11/2020, 4:40 AM
Maybe I should start fresh. What would be a good way to achieve a clean slate? I don't know where npm / node / pulumi leave files around my system, so I don't know what might get re-used. I've tried to isolate everything into the pulumi-nodejs container but stuff keeps leaking out. I could create a new user, clone my repo, and see how that goes...
f

faint-table-42725

08/11/2020, 4:47 AM
Are you using a monorepo? I noticed the path above is
/pulumi/projects/node_modules/@pulumi/pulumi
which seems to be not project-specific
l

little-cartoon-10569

08/11/2020, 4:49 AM
I build in a container. It's a small monorepo, I guess. All my .ts code, whether resources or Pulumi projects, are in the one repo.
Works fine in a new workspace.. something is polluting my workspace 😞