https://serverless-stack.com/ logo
#help
Title
# help
p

Paul

12/16/2021, 12:17 PM
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

thdxr

12/16/2021, 5:19 PM
Hey Paul give me a few hours or so and I'll help you debug this
p

Paul

12/17/2021, 10:01 AM
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

thdxr

12/17/2021, 1:01 PM
Ah got it let me fix
p

Paul

12/20/2021, 10:47 AM
@thdxr Any progress on this?
t

thdxr

12/20/2021, 1:30 PM
Yes latest build
Ah wait the pr wasnt merged will do today
p

Paul

12/20/2021, 3:46 PM
thx, will try asap and report back
Can confirm that the latest build solves the issue. Thanks a lot 🙏
3 Views