gifted-island-55702
07/23/2021, 9:43 AMmy-provider
). I add it as a dependency in my pulumi program using git url (so I have "my-provider": "git+ssh……"
in my pulumi program package.json). Now when I try to run pulumi up
I’m getting: TypeError: Class constructor Resource cannot be invoked without 'new'
. Both my provider module and my pulumi program tsconfig.json is the following:
{
"compilerOptions": {
"strict": true,
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": true,
"pretty": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.ts"
]
}
Any hints what I might be doing wrong?little-cartoon-10569
07/25/2021, 10:18 PMgifted-island-55702
07/26/2021, 5:43 AMimport {MyResource} from 'my-module/myprovider';
;; ...
const myResource = new MyResource(..., ...);
little-cartoon-10569
07/26/2021, 5:44 AMnew
, so the error message makes no sense to me. Are you exporting a default?gifted-island-55702
07/26/2021, 6:00 AMexport class MyResource extends pulumi.dynamic.Resource {
constructor(name: string, args: ...) {
super(myProvider, name, args);
}
}
_super.call(…)
instead of new Resource
.