diff --git a/platform/src/components/aws/function.ts b/platform/src/components/aws/function.ts index 400b140d8..1501e1894 100644 --- a/platform/src/components/aws/function.ts +++ b/platform/src/components/aws/function.ts @@ -1546,7 +1546,7 @@ export class Function extends Component implements Link.Linkable { // Validate handler file exists const newHandlerFileExt = [".js", ".mjs", ".cjs"].find((ext) => fs.existsSync( - path.join(bundle, handlerDir, oldHandlerFileName + ext), + path.join(bundle!, handlerDir, oldHandlerFileName + ext), ), ); if (!newHandlerFileExt)