You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the recent change #167 is good but we need to have the examples in repo updated (that also serve as tests). Apparently the wrong code is being tested, not the release candidate but some older version.
Example
cd examples/ec2-instance
npm i ~/code/pulumi-cdk
pulumi preview
Diagnostics:
pulumi:pulumi:Stack (pulumi-aws-cdk-ec2-instance-dev):
error: Running program '/Users/anton/code/pulumi-cdk/examples/ec2-instance/' failed with an unhandled exception:
TSError: ⨯ Unable to compile TypeScript:
index.ts(10,9): error TS2554: Expected 2-3 arguments, but got 1.
index.ts(21,33): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
Type 'Ec2CdkStack' is not assignable to type 'Construct'.
Types of property 'node' are incompatible.
Type 'import("/Users/anton/code/pulumi-cdk/node_modules/constructs/lib/construct").Node' is not assignable to type 'import("/Users/anton/code/pulumi-cdk/examples/ec2-instance/node_modules/constructs/lib/construct").Node'.
Types have separate declarations of a private property 'host'.
index.ts(33,53): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(40,35): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(53,46): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(62,33): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(75,27): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(77,27): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(80,27): error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
index.ts(84,14): error TS2339: Property 'synth' does not exist on type 'Ec2CdkStack'.
Output of pulumi about
N/A
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
CDK libraries have a weird requirement that only a single version of
`aws-cdk-lib` and `constructs` be installed. This means that the
`devDependency` in `package.json` and the dependencies in each
`examples` `package.json` needs to be the same. If they are different
versions then the examples will fail with `Argument of type 'this' is not assignable to parameter of type 'Construct'.`
fixes#175
CDK libraries have a weird requirement that only a single version of
`aws-cdk-lib` and `constructs` be installed. This means that the
`devDependency` in `package.json` and the dependencies in each
`examples` `package.json` needs to be the same. If they are different
versions then the examples will fail with `Argument of type 'this' is
not assignable to parameter of type 'Construct'.`
Note: the `peerDependency` is still a floating version so users can
still install the range of versions.
fixes#175
What happened?
I think the recent change #167 is good but we need to have the examples in repo updated (that also serve as tests). Apparently the wrong code is being tested, not the release candidate but some older version.
Example
Output of
pulumi about
N/A
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: