Giter VIP home page Giter VIP logo

Comments (11)

t0yv0 avatar t0yv0 commented on July 26, 2024
node_modules/@smithy/util-stream/dist-types/stream-type-check.d.ts:4:71 - error TS2315: Type 'ReadableStream' is not generic.
 
 4 export declare const isReadableStream: (stream: unknown) => stream is ReadableStream<any>;

Interesting.

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024
[2] anton@anton-mbp-m3> npm ls "@smithy/util-stream"        ~/code/pulumi-eks/examples/cluster
example-cluster@ /Users/anton/code/pulumi-eks/examples/cluster
└─┬ @pulumi/[email protected]
  └─┬ @aws-sdk/[email protected]
    ├─┬ @aws-sdk/[email protected]
    │ └─┬ @aws-sdk/[email protected]
    │   └── @smithy/[email protected] deduped
    └─┬ @smithy/[email protected]
      └── @smithy/[email protected]

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

Reproduces locally for me with latest everything

{
    "name": "example-cluster",
    "devDependencies": {
        "typescript": "^5.0.0"
    },
    "dependencies": {
        "@pulumi/pulumi": "latest",
        "@pulumi/awsx": "latest",
        "@pulumi/eks": "latest"
    },
    "scripts": {
        "build": "tsc"
    }
}

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

ALso

error: Running program '/private/var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com.apple.shor
tcuts.mac-helper/p-it-anton-mbp--aws-profil-c2986885-1228417215/' failed with an unhandled exce
ption:
<ref *1> TypeError: c.g is not a function
    at Function.N.setWrapperField (/private/var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com
.apple.shortcuts.mac-helper/p-it-anton-mbp--aws-profil-c2986885-1228417215/node_modules/google-
protobuf/google-protobuf.js:91:66)
    at proto.pulumirpc.ResourceInvokeRequest.setArgs (/private/var/folders/gd/3ncjb1lj5ljgk8xl5
ssn_gvc0000gn/T/com.apple.shortcuts.mac-helper/p-it-anton-mbp--aws-profil-c2986885-1228417215/n
ode_modules/@pulumi/pulumi/proto/resource_pb.js:4151:23)
    at createInvokeRequest (/private/var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com.apple.
shortcuts.mac-helper/p-it-anton-mbp--aws-profil-c2986885-1228417215/node_modules/@pulumi/runtim
e/invoke.ts:215:9)
    at /private/var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com.apple.shortcuts.mac-helper/
p-it-anton-mbp--aws-profil-c2986885-1228417215/node_modules/@pulumi/runtime/invoke.ts:154:21
    at Generator.next (<anonymous>)
    at fulfilled (/private/var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com.apple.shortcuts.
mac-helper/p-it-anton-mbp--aws-profil-c2986885-1228417215/node_modules/@pulumi/pulumi/runtime/i
nvoke.js:18:58) {
  promise: Promise { <rejected> [Circular *1] }

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

Looks like overriding @google-protobuf dependency in @pulumi/pulumi to the latest version helps some of these test to pass. #1262

from pulumi-eks.

flostadler avatar flostadler commented on July 26, 2024

Type 'ReadableStream' is not generic. Seems to be an upstream issue in smithy smithy-lang/smithy-typescript#1341

Given that the dependency comes in through awsx we might wanna check if we can repro with that and if necessary downgrade the aws client version in the awsx node SDK

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

That's a nice find. I was searching for issues yesterday but this one was not filed yet.

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

AWSX is on a version that is not affected (yet). I think we can leave things as is, this issue will be findable through org-wide GitHub search.

yarn why '@smithy/util-stream'                                                                                           ~/code/pulumi-awsx/sdk/nodejs
yarn why v1.22.19
[1/4] 🤔  Why do we have the module "@smithy/util-stream"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@smithy/[email protected]"
info Reasons this module exists
   - "@aws-sdk#client-ecs#@smithy#smithy-client" depends on it
   - Hoisted from "@aws-sdk#client-ecs#@smithy#smithy-client#@smithy#util-stream"
   - Hoisted from "@aws-sdk#client-ecs#@aws-sdk#credential-provider-node#@aws-sdk#credential-provider-http#@smithy#util-stream"
info Disk size without dependencies: "164KB"
info Disk size with unique dependencies: "2.34MB"
info Disk size with transitive dependencies: "2.81MB"
info Number of shared dependencies: 12
✨  Done in 0.12s.

from pulumi-eks.

flostadler avatar flostadler commented on July 26, 2024

@t0yv0 I don't think that's right. pulumi-awsx has the following semver range in its node SDK: "@aws-sdk/client-ecs": "^3.405.0"

So if you initialize a new node project using awsx it'll pull the latest minor version of both aws-sdk/client-ecs and @smithy/util-stream.

I just initialized a new node project locally and get the following:

➜  yarn why '@smithy/util-stream'
yarn why v1.22.22
warning package.json: No license field
[1/4] 🤔  Why do we have the module "@smithy/util-stream"...?
[2/4] 🚚  Initialising dependency graph...
warning eks-alias-testing: No license field
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@smithy/[email protected]"
info Reasons this module exists
   - "@pulumi#awsx#@aws-sdk#client-ecs#@smithy#smithy-client" depends on it
   - Hoisted from "@pulumi#awsx#@aws-sdk#client-ecs#@smithy#smithy-client#@smithy#util-stream"
   - Hoisted from "@pulumi#awsx#@aws-sdk#client-ecs#@aws-sdk#credential-provider-node#@aws-sdk#credential-provider-http#@smithy#util-stream"
info Disk size without dependencies: "244KB"
info Disk size with unique dependencies: "2.44MB"
info Disk size with transitive dependencies: "2.92MB"
info Number of shared dependencies: 12
✨  Done in 0.45s.
➜  yarn why '@aws-sdk/client-ecs'
yarn why v1.22.22
warning package.json: No license field
[1/4] 🤔  Why do we have the module "@aws-sdk/client-ecs"...?
[2/4] 🚚  Initialising dependency graph...
warning eks-alias-testing: No license field
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@aws-sdk/[email protected]"
info Reasons this module exists
   - "@pulumi#awsx" depends on it
   - Hoisted from "@pulumi#awsx#@aws-sdk#client-ecs"
info Disk size without dependencies: "2.6MB"
info Disk size with unique dependencies: "13.26MB"
info Disk size with transitive dependencies: "17.61MB"
info Number of shared dependencies: 45
✨  Done in 0.54s.

If we can repro in awsx (I wasn't able to so far) then we could add an override in for @smithy/util-stream in the node sdk

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

Interesting, I couldn't repro on the pulumi new aws-typescript project but I can repro in the cluster example. This boiled down to this difference in tsconfig.json that is present in the cluster example but not in a brand-new project:

{
    "compilerOptions": {
        "lib": [
            "es6"
        ],

Adding this makes the problem trigger.

The lib option is documented here:
https://www.typescriptlang.org/tsconfig/#lib

from pulumi-eks.

t0yv0 avatar t0yv0 commented on July 26, 2024

The build failure is fixed by a combination of #1262 and #1260

from pulumi-eks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.