Hey, since updating to 0.54.2 `sst deploy` fails w...
# help
p
Hey, since updating to 0.54.2
sst deploy
fails with the following error:
Error: There was a problem transpiling the Lambda handler.
sst start
is working normally and all lambdas are compiling and running. Deploy also works when I remove my
esbuildConfig
. It looks like this:
esbuildConfig: { plugins: "config/esbuild.js" }
and contents of esbuild.js:
Copy code
const { esbuildDecorators } = require("@anatine/esbuild-decorators");

module.exports = [esbuildDecorators()];
Any ideas? I know it would be helpful to get more detailed log output, but the
--verbose
flag does not provide more info on the error.
t
Hey Paul give me a few hours or so and I'll help you debug this
p
Seems that after updating to
0.54.3
I get more detailed info:
Copy code
Error: There was a problem transpiling the Lambda handler: > lib/database/entities/PersistedPriceModel.ts:1:18: warning: Top-level "this" will be replaced with undefined since this file is an ECMAScript module
     1 │ var __decorate = (this && this.__decorate) || function (decorators, ...
       ╵                   ~~~~
   lib/database/entities/PersistedPriceModel.ts:10:0: note: This file is considered an ECMAScript module because of the "import" keyword here
    10 │ import { Attribute, Entity, INDEX_TYPE } from "@typedorm/common";
       ╵ ~~~~~~
Same warning occurs in multiple files that all use decorators. Two options: 1. Seems like sst is interpreting these warnings as errors. So far I found no way to silence the esbuild warnings through sst. 2. Maybe there is an error somewhere but I cannot see it as the log output is truncated after ~100 lines. Would be weird as all functions are building and running with
sst start
.
t
Ah got it let me fix
p
@thdxr Any progress on this?
t
Yes latest build
Ah wait the pr wasnt merged will do today
p
thx, will try asap and report back
Can confirm that the latest build solves the issue. Thanks a lot 🙏