stocky-rain-57539
02/17/2025, 3:38 PMCannot read properties of undefined (reading 'invoke')
I traced it to this line : https://github.com/pulumi/pulumi/blob/3ec1aa7/sdk/nodejs/runtime/invoke.ts#L307
monitor.invoke(req, (err: grpc.ServiceError, innerResponse: any)
where monitor is undefined. after searching I find out that I have to set this variable PULUMI_NODEJS_MONITOR which is the monitor variable, and I don't see any documentation for it.
could anyone guide me into this ? I know its related to rpc, but I couldn't find any related/helpful docs
thanks.stocky-rain-57539
02/17/2025, 3:52 PMexport function getMonitor(): resrpc.IResourceMonitorClient | undefined {
const { settings } = getStore();
const addr = options().monitorAddr;
if (getLocalStore() === undefined && addr !== "mock") {
if (monitor === undefined) {
if (addr) {
// Lazily initialize the RPC connection to the monitor.
monitor = new resrpc.ResourceMonitorClient(addr, grpc.credentials.createInsecure(), grpcChannelOptions);
settings.options.monitorAddr = addr;
}
}
return monitor;
} else {
if (settings.monitor === undefined) {
if (addr) {
// Lazily initialize the RPC connection to the monitor.
settings.monitor = new resrpc.ResourceMonitorClient(
addr,
grpc.credentials.createInsecure(),
grpcChannelOptions,
);
settings.options.monitorAddr = addr;
}
}
return settings.monitor;
}
}