great-sundown-78827
08/22/2025, 8:38 PMpulumi package add terraform-provider vantage-sh/vantage
warning: <nil>: #/functions/pulumi:providers:vantage%2FterraformConfig/inputs/properties/__self__/$ref: reference to provider resource '/resources/pulumi:providers:vantage' is deprecated, use '#/provider' instead;
warning: <nil>: #/functions/pulumi:providers:vantage%2FterraformConfig/inputs/properties/__self__/$ref: reference to provider resource '/resources/pulumi:providers:vantage' is deprecated, use '#/provider' instead;
Successfully generated a Nodejs SDK for the vantage package at /Users/diranged/git/nextdoor/infra-observability/sdks/vantage
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: jest-config@30.0.5
npm warn Found: @types/node@18.19.123
npm warn node_modules/@jest/core/node_modules/jest-config/node_modules/@types/node
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional @types/node@"*" from jest-config@30.0.5
npm warn node_modules/@jest/core/node_modules/jest-config
npm warn jest-config@"30.0.5" from @jest/core@30.0.5
npm warn node_modules/@jest/core
npm error code 1
npm error path ..../sdks/vantage
npm error command failed
npm error command sh -c node ./scripts/postinstall.js
npm error Command failed: tsc: ../../node_modules/jest-mock/build/index.d.ts(8,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.
I haven't yet tracked down what is failing... ive tried upgrading to Node 24, and we are usiing Typescript 5.9... all of our dependencies are updated to the latest versions.
Any thoughts?great-sundown-78827
08/22/2025, 8:39 PM% find node_modules -name lib.esnext.disposable.d.ts
node_modules/typescript/lib/lib.esnext.disposable.d.ts
white-camera-67848
08/25/2025, 2:02 PMsdks/vantage/package.json
here?white-camera-67848
08/25/2025, 2:03 PM@types/node@24
also?
I am a bit confused why it’s poking through jest-mocks while compiling the code for the SDK though 🤔great-sundown-78827
08/25/2025, 2:20 PMsdks/vantage/package.json
gets set up with:
"devDependencies": {
"@types/node": "^18",
"typescript": "^4.3.5"
},
It seems to me that it's installing typescript 4.3.5 (because of the very explicit version pinning... as opposed to something like ^4
... ), which doesn't have esnext.disposable
in it at all.great-sundown-78827
08/25/2025, 2:22 PMsdks/vantage/package.json
that gets generated
{
"name": "@pulumi/vantage",
"version": "0.1.62",
"description": "A Pulumi provider dynamically bridged from vantage.",
"repository": "<https://github.com/vantage-sh/terraform-provider-vantage>",
"main": "bin/index.js",
"scripts": {
"build": "tsc",
"postinstall": "node ./scripts/postinstall.js"
},
"dependencies": {
"@pulumi/pulumi": "^3.142.0",
"async-mutex": "^0.5.0"
},
"devDependencies": {
"@types/node": "^18",
"typescript": "^4.3.5"
},
"pulumi": {
"resource": true,
"name": "terraform-provider",
"version": "0.13.0",
"parameterization": {
"name": "vantage",
"version": "0.1.62",
"value": "eyJyZW1vdGUiOnsidXJsIjoicmVnaXN0cnkub3BlbnRvZnUub3JnL3ZhbnRhZ2Utc2gvdmFudGFnZSIsInZlcnNpb24iOiIwLjEuNjIifX0="
}
}
}
great-sundown-78827
08/25/2025, 2:23 PM% cd sdks/vantage
% yarn install
yarn install v1.22.22
warning package.json: No license field
info No lockfile found.
warning @pulumi/vantage@0.1.62: No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
$ node ./scripts/postinstall.js
Command failed: tsc: ../../node_modules/expect/node_modules/jest-mock/build/index.d.ts(8,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/install> for documentation about this command.
% ./node_modules/.bin/tsc --version
Version 4.9.5
white-camera-67848
08/25/2025, 2:24 PMgreat-sundown-78827
08/25/2025, 2:34 PMgreat-sundown-78827
08/25/2025, 2:34 PMgreat-sundown-78827
08/25/2025, 2:34 PM% pulumi version
v3.188.0
great-sundown-78827
08/25/2025, 2:34 PMwhite-camera-67848
08/25/2025, 2:35 PM../../
. Do you have a setup with workspaces?
I just tried pulumi new typescript
and then pulumi package add terraform-provider vantage-sh/vantage
and that works.
Hopefully the latest CLI version helps here, but there might still be something else going on.great-sundown-78827
08/25/2025, 2:35 PMwhite-camera-67848
08/25/2025, 2:35 PMgreat-sundown-78827
08/25/2025, 2:36 PMgreat-sundown-78827
08/25/2025, 2:37 PMtsconfig.json
you'd like to see that might help here?great-sundown-78827
08/25/2025, 2:38 PMnodenv
for node?white-camera-67848
08/25/2025, 2:38 PMgreat-sundown-78827
08/25/2025, 2:39 PM% cat tsconfig.json
// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
{
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"alwaysStrict": true,
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true,
"lib": [
"es2020"
],
"module": "CommonJS",
"noEmitOnError": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"stripInternal": true,
"target": "ES2020"
},
"include": [
"src/**/*.ts"
],
"exclude": []
}
this is our root level tsconfig.jsonwhite-camera-67848
08/25/2025, 2:39 PMsdk/vantage
has its own tsconfig.json
, so that should be standalone and not take that into account, or does it? Not entirely sure how this sort of nesting works in typescriptgreat-sundown-78827
08/25/2025, 2:40 PM% cat package.json
{
"name": "...",
"scripts": {
"build": "npx projen build",
"ca:login": "npx projen ca:login",
"clobber": "npx projen clobber",
"compile": "npx projen compile",
"default": "npx projen default",
"eject": "npx projen eject",
"eslint": "npx projen eslint",
"package": "npx projen package",
"post-compile": "npx projen post-compile",
"post-upgrade": "npx projen post-upgrade",
"pre-compile": "npx projen pre-compile",
"test": "npx projen test",
"test:watch": "npx projen test:watch",
"upgrade": "npx projen upgrade",
"watch": "npx projen watch",
"projen": "npx projen"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^18",
"@typescript-eslint/eslint-plugin": "^8",
"@typescript-eslint/parser": "^8",
"constructs": "^10.0.0",
"eslint": "^9",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.4",
"jest": "^30.0.5",
"jest-junit": "^16",
"prettier": "^3.6.2",
"projen": "^0",
"ts-jest": "^29.4.1",
"ts-node": "^10.9.2",
"typescript": "^5.9.2"
},
"dependencies": {
"@lbrlabs/pulumi-grafana": "^0",
"@....<internal pkg>": "latest",
"@pulumi/datadog": "^4",
"@pulumi/pagerduty": "^4",
"@pulumi/pulumi": "^3",
"@slack/web-api": "^7",
"@types/async-lock": "^1",
"@types/js-yaml": "^4",
"async-lock": "^1",
"js-yaml": "^4",
"projen": "^0",
"re2js": "0",
"ts-deepmerge": "^7"
},
"engines": {
"node": ">= 24.2.0"
},
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
"version": "0.0.0",
"jest": {
"coverageProvider": "babel",
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"testMatch": [
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
],
"clearMocks": true,
"collectCoverage": true,
"coverageReporters": [
"json",
"lcov",
"clover",
"cobertura",
"text"
],
"coverageDirectory": "coverage",
"coveragePathIgnorePatterns": [
"/node_modules/"
],
"testPathIgnorePatterns": [
"/node_modules/"
],
"watchPathIgnorePatterns": [
"/node_modules/"
],
"reporters": [
"default",
[
"jest-junit",
{
"outputDirectory": "test-reports"
}
]
],
"transform": {
"^.+\\.[t]sx?$": [
"ts-jest",
{
"tsconfig": "tsconfig.dev.json"
}
]
}
},
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
}
white-camera-67848
08/25/2025, 2:41 PMsdks/vantage/node_modules/typescript
exist? and what version is in package.json
.
I would expect that to be 4.3
great-sundown-78827
08/25/2025, 2:41 PMESNext.Disposable
?white-camera-67848
08/25/2025, 2:42 PMsdks/vantage
is meant to be its own thing, that’s compiled down to Javascript via postinstallwhite-camera-67848
08/25/2025, 2:43 PMgreat-sundown-78827
08/25/2025, 2:43 PMls sdks/vantage/node_modules/typescript
does not work - when i run the pulumi package add terraform-provider vantage-sh/vantage
it jumps into running tsc
.. but that happens before it tries a yarn install itseems?great-sundown-78827
08/25/2025, 2:44 PMsdks/vantage
directory is ending up using tsc
from the top level package... but then breaking..white-camera-67848
08/25/2025, 2:45 PMwhite-camera-67848
08/25/2025, 2:45 PMcd sdks/vantage && yarn install && yarn run postinstall
?
Also checking, are you using yarn or npm or some other package manager (they should all work)white-camera-67848
08/25/2025, 2:47 PMwhite-camera-67848
08/25/2025, 2:48 PM$ node ./scripts/postinstall.js
Command failed: tsc: ../../node_modules/expect/node_modules/jest-mock/build/index.d.ts(8,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.
This is the part that i don’t understand. What makes it look at ../../node_modules/….
?great-sundown-78827
08/25/2025, 2:51 PM% cd sdks/vantage && yarn install && yarn run postinstall
yarn install v1.22.22
warning package.json: No license field
warning @pulumi/vantage@0.1.62: No license field
[1/4] 🔍 Resolving packages...
success Already up-to-date.
$ node ./scripts/postinstall.js
Failed to run 'tsc' {
stdout: "../../node_modules/expect/node_modules/jest-mock/build/index.d.ts(8,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.\n",
stderr: ''
}
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/install> for documentation about this command.
great-sundown-78827
08/25/2025, 2:52 PMwhite-camera-67848
08/25/2025, 2:53 PMThat is weird too. What is supposed to happen is thatdoes not work - when i run thels sdks/vantage/node_modules/typescript
it jumps into runningpulumi package add terraform-provider vantage-sh/vantage
.. but that happens before it tries a yarn install itseems?tsc
pulumi package add …
first generates the SDK (this part works), then it calls something like npm add @pulumi/vantage@file:./sdks/vantage
. This npm add
call (or yarn or pnpm or … depending on the configured package manager) will then execute the postinstall script during intsallation, which compiles the sdk to javascript.white-camera-67848
08/25/2025, 2:54 PMsdks/vantage/node_modules/typescript
does not seem to exist 🤔great-sundown-78827
08/25/2025, 2:54 PMyarn install
inside the sdks/vantage
directory?white-camera-67848
08/25/2025, 2:56 PMpulumi package add
should run that that toowhite-camera-67848
08/25/2025, 2:56 PMgreat-sundown-78827
08/25/2025, 2:57 PMyarn install
in the sdks/vantage
directory to work, i have to patch the package.json
and change the typescript dependency version... so there is clearly something happening where its leveraging the parent-level stuff. I wonder if that's due to nodenv
in someway.great-sundown-78827
08/25/2025, 2:59 PMwhite-camera-67848
08/25/2025, 3:03 PMpulumi package add
does not run yarn install
or similar, it just runs yarn add @pulumi/vantage@file:./sdks/vantage
to link it into the project.
If it wants a different version of tsc, it will install that into sdks/vantage/node_modules
to disambiguate from the toplevel one.white-camera-67848
08/25/2025, 3:03 PMwhite-camera-67848
08/25/2025, 3:11 PMgreat-sundown-78827
08/25/2025, 3:14 PMgreat-sundown-78827
08/25/2025, 3:14 PMwhite-camera-67848
08/25/2025, 4:42 PM@types/...
packages it finds, but some of these might not be compatible with the typescript version used by the SDK, leading to the error.
To make this work, we need to change our postinstall.js
script to pass the --types
flag to tsc
, so that we can control which @types/...
packages it should use (just the ones the SDK depends on, for example tsc --types node
).
I should be able to get a PR in for this week’s release.
In the meantime, you could remove @types/jest
or maybe downgrading to @types/jest 29
, but either of that might not be possible, depending on your jest usage in the project.great-sundown-78827
08/25/2025, 9:50 PMpulumi
cli was going to do anyways... so right now I am fine to experiment. Is there a github issue to track this issue so I can subscribe?white-camera-67848
08/26/2025, 7:36 AMgreat-sundown-78827
08/28/2025, 12:01 AM% /Users/diranged/.pulumi/bin/pulumi version && /Users/diranged/.pulumi/bin/pulumi package add terraform-provider vantage-sh/vantage
v3.192.0-alpha.1756194825
warning: using pulumi-language-nodejs from $PATH at /opt/homebrew/bin/pulumi-language-nodejs expected /Users/diranged/.pulumi/bin/pulumi-language-nodejs
warning: <nil>: #/functions/pulumi:providers:vantage%2FterraformConfig/inputs/properties/__self__/$ref: reference to provider resource '/resources/pulumi:providers:vantage' is deprecated, use '#/provider' instead;
warning: <nil>: #/functions/pulumi:providers:vantage%2FterraformConfig/inputs/properties/__self__/$ref: reference to provider resource '/resources/pulumi:providers:vantage' is deprecated, use '#/provider' instead;
Successfully generated a Nodejs SDK for the vantage package at .../sdks/vantage
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: jest-config@30.0.5
npm WARN Found: @types/node@24.3.0
npm WARN node_modules/jest-config/node_modules/@types/node
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/node@"*" from jest-config@30.0.5
npm WARN node_modules/jest-config
npm WARN jest-config@"30.0.5" from jest-cli@30.0.5
npm WARN node_modules/jest-cli
npm ERR! code 1
npm ERR! path /..../sdks/vantage
npm ERR! command failed
npm ERR! command sh -c node ./scripts/postinstall.js
npm ERR! Failed to run 'tsc' {
npm ERR! stdout: "../../node_modules/jest-mock/build/index.d.ts(8,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.\n",
npm ERR! stderr: ''
npm ERR! }
white-camera-67848
08/28/2025, 7:52 AMpulumi-language-nodejs
. The pulumi
binary starts up the nodejs language plugin to run the code generation.great-sundown-78827
08/28/2025, 3:40 PMwhite-camera-67848
08/28/2025, 3:42 PMpulumi-language-nodejs
and place it next to the pulumi
binary.
I think you could just install the latest dev
releases https://www.pulumi.com/docs/iac/download-install/#installing-dev-releasesgreat-sundown-78827
08/28/2025, 3:45 PMwhite-camera-67848
08/28/2025, 3:57 PMpulumi
white-camera-67848
08/28/2025, 3:58 PMcurl -fsSL <https://get.pulumi.com> | sh -s -- --version dev
it should be in ~/.pulumi/bin
great-sundown-78827
08/28/2025, 4:07 PM% cat ./bin/pulumi-resource-pulumi-nodejs
#!/bin/sh
PULUMI_DYNAMIC_PROVIDER_SCRIPT_PATH=$(node -e "console.log(require.resolve('@pulumi/pulumi/cmd/dynamic-provider'))")
if [ ! -z "$PULUMI_DYNAMIC_PROVIDER_SCRIPT_PATH" ]; then
node "$PULUMI_DYNAMIC_PROVIDER_SCRIPT_PATH" $@
fi
I'm not sure where the pulumi provider is being loaded from:
% find .
.
./dynamic_tf_plugins
./dynamic_tf_plugins/registry.opentofu.org
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage/0.1.62
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage/0.1.62/darwin_arm64
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage/0.1.62/darwin_arm64/LICENSE
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage/0.1.62/darwin_arm64/README.md
./dynamic_tf_plugins/registry.opentofu.org/vantage-sh/vantage/0.1.62/darwin_arm64/terraform-provider-vantage_v0.1.62
./bin
./bin/pulumi-resource-pulumi-python
./bin/pulumi-language-nodejs
./bin/pulumi-resource-pulumi-nodejs
./bin/pulumi-analyzer-policy-python
./bin/pulumi-language-go
./bin/pulumi-language-python
./bin/pulumi-language-java
./bin/pulumi-analyzer-policy
./bin/pulumi-watch
./bin/pulumi-language-yaml
./bin/pulumi-language-dotnet
./bin/pulumi
./bin/pulumi-language-python-exec
./plugins
./plugins/resource-terraform-provider-v0.13.0.lock
./plugins/resource-terraform-provider-v0.13.0
./plugins/resource-terraform-provider-v0.13.0/LICENSE
./plugins/resource-terraform-provider-v0.13.0/CHANGELOG_OLD.md
./plugins/resource-terraform-provider-v0.13.0/README.md
./plugins/resource-terraform-provider-v0.13.0/pulumi-resource-terraform-provider