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

calm-greece-42329

02/22/2019, 11:06 PM
Forgive me if this is dumb, Pulumi is my first intro to typescript. I am trying to create a k8s custom resource but my
@pulumi/kubernetes
doesn’t have
apiextensions.v1beta1.CustomResource
but it looks like its in the `v0.20.3`release I am using: https://github.com/pulumi/pulumi-kubernetes/blob/v0.20.3/sdk/nodejs/provider.ts#L3098
c

creamy-potato-29402

02/22/2019, 11:07 PM
sorry, I don’t understand the question?
c

calm-greece-42329

02/22/2019, 11:08 PM
i don’t blame you
Copy code
import * as k8s from "@Pulumi Team/kubernetes";
const tls = new k8s.apiextensions.v1beta1.CustomResource(.....)
that CustomResource doesn’t exist in my yarn install’d v0.20.3
basically it looks like the yarn install’d v0.20.3 is some older version that existed before CustomResource was added
c

creamy-potato-29402

02/22/2019, 11:10 PM
hmm
are you using the EKS package?
can you share the entries in
package-lock.json
relevant to the
@pulumi/kubernetes
package?
c

calm-greece-42329

02/22/2019, 11:11 PM
Copy code
"@pulumi/kubernetes": {
            "version": "0.20.3",
            "resolved": "<https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-0.20.3.tgz>",
            "integrity": "sha512-8ZbDuDKZaHp7TWBBurWYStwb5je2C1VEVDJRJis8qju679DO8VQowIr9PSBV3AJJBlrvIM5A4Kg/M8+oDhfZqQ==",
            "requires": {
                "@pulumi/pulumi": "^0.16.14",
                "@types/glob": "^5.0.35",
                "@types/js-yaml": "^3.11.2",
                "@types/node-fetch": "^2.1.4",
                "@types/tmp": "^0.0.33",
                "glob": "^7.1.2",
                "js-yaml": "^3.12.0",
                "node-fetch": "^2.3.0",
                "shell-quote": "^1.6.1",
                "tmp": "^0.0.33"
            }
        },
c

creamy-potato-29402

02/22/2019, 11:11 PM
there might be more than one
c

calm-greece-42329

02/22/2019, 11:12 PM
i was thinking maybe some rogue build happened and pushed a differnet v0.20.3 up or something
c

creamy-potato-29402

02/22/2019, 11:13 PM
I would be surprised if that was true
are you using EKS? Are there multiple entries for that package?
c

calm-greece-42329

02/22/2019, 11:13 PM
that sha matches what i see in the job that pushed from the v0.20.3 branch
c

creamy-potato-29402

02/22/2019, 11:13 PM
also what’s the error?
c

calm-greece-42329

02/22/2019, 11:13 PM
nah this isnt eks
c

creamy-potato-29402

02/22/2019, 11:13 PM
compile-time error?
No, I mean the EKS package.
c

calm-greece-42329

02/22/2019, 11:14 PM
yeah, it doesnt exist in the providers.d.ts file
then i have no idea
whats the EKS package?
c

creamy-potato-29402

02/22/2019, 11:14 PM
lol I guess not.
@pulumi/eks
c

calm-greece-42329

02/22/2019, 11:14 PM
oh, no i am not
🙂
oh maybe i am?
Copy code
{
  "name": "aws-typescript",
  "devDependencies": {
    "@types/node": "latest"
  },
  "dependencies": {
    "@pulumi/pulumi": "latest",
    "@pulumi/aws": "latest",
    "@pulumi/kubernetes": "latest"
  }
}
i dont know if aws pulled it in
c

creamy-potato-29402

02/22/2019, 11:15 PM
no
different thing
hmm, how odd.
c

calm-greece-42329

02/22/2019, 11:16 PM
im gonna bomb my node_modules and see if i end up with the same thing
c

creamy-potato-29402

02/22/2019, 11:17 PM
ok
c

calm-greece-42329

02/22/2019, 11:18 PM
same thing
c

creamy-potato-29402

02/22/2019, 11:18 PM
can you delete
package-lock.json
AND
node_modules
and try it again?
c

calm-greece-42329

02/22/2019, 11:19 PM
yeah i did all that, i just made a new directory with a brand new package.json and ended up with the same thing
im gonna look for a cache 🔫
c

creamy-potato-29402

02/22/2019, 11:19 PM
ugh
so weird.
hang on let me try to do this myself.
c

calm-greece-42329

02/22/2019, 11:20 PM
ok must have been some kind of cache
c

creamy-potato-29402

02/22/2019, 11:20 PM
it works?
c

calm-greece-42329

02/22/2019, 11:21 PM
yeah i think so, lets see
c

creamy-potato-29402

02/22/2019, 11:21 PM
omg dependency management systems
c

calm-greece-42329

02/22/2019, 11:22 PM
oh well this didnt help, the resource is at
apiextensions.CustomResource
not
apiextensions.v1beta1.CustomResource
c

creamy-potato-29402

02/22/2019, 11:22 PM
oh dammit
this is my fault.
I should have noticed that.
Sorry dude.
c

calm-greece-42329

02/22/2019, 11:22 PM
np
we got farther in 15min than i got in 45
c

creamy-potato-29402

02/22/2019, 11:23 PM
I knew this was a gotcha and still messed it up lol