```STACK_TRACE: Error: at Object.debug...
# aws
k
Copy code
STACK_TRACE:
    Error:
        at Object.debuggablePromise (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/pulumi/runtime/debuggable.js:69:75)
        at Object.registerResource (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/pulumi/runtime/resource.js:132:18)
        at new Resource (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/pulumi/resource.js:211:24)
        at new CustomResource (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/pulumi/resource.js:303:9)
        at new TaskDefinition (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/ecs/taskDefinition.ts:203:9)
        at new TaskDefinition (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/ecs/taskDefinition.ts:80:31)
        at new FargateTaskDefinition (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/ecs/fargateService.ts:48:9)
        at new FargateService (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/ecs/fargateService.ts:206:13)
        at Object.<anonymous> (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/ecs/index.js:14:22)
        at Module._compile (internal/modules/cjs/loader.js:1133:30)
 
    error: Running program '/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra' failed with an unhandled exception:
    TypeError: Cannot read property 'lastIndexOf' of undefined
        at Object.getImageNameAndTag (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/utils.ts:25:37)
        at checkRepositoryUrl (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker.ts:190:27)
        at /Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker.ts:230:5
        at Generator.next (<anonymous>)
        at /Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker/docker.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker/docker.js:17:12)
        at buildAndPushImageWorkerAsync (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker/docker.js:133:12)
        at Object.<anonymous> (/Users/qalbaqali/Documents/Personal/rawag-v2/core/infra/node_modules/@pulumi/docker.ts:172:34)
        at Generator.next (<anonymous>)
Tracking the origin of this error using the stack trace (to my understanding) is because when pulumi is trying to build the image, it's crashing when it's trying to get the Docker image name
Cannot read property 'lastIndexOf' of undefined
which is in the
@pulumi/docker/utils.js
https://github.com/pulumi/pulumi-docker/blob/master/sdk/nodejs/utils.ts#L15 This is all running in github actions CI. Might be related to this github issue: https://github.com/pulumi/pulumi/issues/3626 @faint-table-42725 Deleting all the resources, and creating them again leads to the same error