I’m seem to be hitting new `TypeError: Cannot read...
# help
c
I’m seem to be hitting new
TypeError: Cannot read properties of undefined
errors with code that was working earlier. Not sure if this is related to a recent SST update or not; currently on version 0.53.0. It looks like things are tripping up trying to use imported values. In the example below ‘EventHubBusArn’ is exported from another stack in the same AWS account –
Copy code
const subsystemEventHubBusArn = Fn.importValue('EventHubBusArn').toString();

const eventHubBus = new sst.EventBus(this, 'EventHubBus', {
   eventBridgeEventBus: events.EventBus.fromEventBusArn(this, 'EventHubBusImport', subsystemEventHubBusArn),
});
This was working earlier, but now hits this error –
Copy code
TypeError: Cannot read properties of undefined (reading 'node')
    at EventLakeStack.allocateLogicalId (/Users/clayton/Documents/GitHub/si-install--eventLake/node_modules/@aws-cdk/core/lib/stack.ts:502:31)
    at EventLakeStack.getLogicalId (/Users/clayton/Documents/GitHub/si-install--eventLake/node_modules/@aws-cdk/core/lib/stack.ts:265:28)
    at EventBus.getConstructInfo (/Users/clayton/Documents/GitHub/si-install--eventLake/node_modules/@serverless-stack/resources/src/EventBus.ts:154:41)
    at App.registerConstruct (/Users/clayton/Documents/GitHub/si-install--eventLake/node_modules/@serverless-stack/resources/src/App.ts:400:29)
    at new EventBus (/Users/clayton/Documents/GitHub/si-install--eventLake/node_modules/@serverless-stack/resources/src/EventBus.ts:89:10)
    ...
Any ideas on other ways to debug something like this? Thanks
Ok, it looks like this does build correctly when SST is downgraded to 0.51.1 (and CDK at 1.126.0 respectively; no dice on SST 0.52.0). @Frank
f
Hey @Clayton, just checking if you getting this on 0.52.0 or 0.53.0?
The bug popped up in 0.52.0, and should’ve been fixed in 0.53.0
c
@Frank I’m getting it in 0.53.0 as well
f
c
Hey @Frank - I was testing this again today. It’s happening on 0.53.0 when trying to creating an EventBus by ARN or by Name.
f
@Clayton I will try to get this fixed and cut a release tonite!
c
Awesome, thank you @Frank
f
Hey @Clayton, this should be fixed in 0.53.3. This one took a while to fix, a lot of moving parts involved.
c
Thanks a ton @Frank I should be able to try it out in my setup shortly
f
Sounds good! Let me know.
c
@Frank updated to 0.53.2 and this worked as expected. Thanks again for the push on it, I really appreciate it.