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

Mischa Spiegelmock

06/01/2022, 11:40 PM
Still a blocker for me setting up my new project: https://serverless-stack.slack.com/archives/C01JG3B20RY/p1653769435652249
d

Derek Kershner

06/02/2022, 3:48 PM
Your logs are a failed rollback, why did it start rolling back in the first place?
m

Mischa Spiegelmock

06/02/2022, 3:49 PM
that's what I've been trying to figure out
d

Derek Kershner

06/02/2022, 3:49 PM
its higher in the logs, look for the actual error
m

Mischa Spiegelmock

06/02/2022, 3:50 PM
going to deploy with verbose logging now
d

Derek Kershner

06/02/2022, 3:51 PM
without knowing why the original failed, its tough to say, but I get an invalidation timeout about 20% of all Cloudfront deploys. Next one always seems to work.
m

Mischa Spiegelmock

06/02/2022, 4:00 PM
Every time I deploy a new stack the same thing happens - it gets here and then times out. There are no errors in the console.
it's not intermittent, it's not reporting any error
d

Derek Kershner

06/02/2022, 4:00 PM
what version of SST? ill check what I just deployed on
m

Mischa Spiegelmock

06/02/2022, 4:01 PM
1.2.11
d

Derek Kershner

06/02/2022, 4:01 PM
1.2.11 / 2.24.0
well, that aint it.
m

Mischa Spiegelmock

06/02/2022, 4:02 PM
d

Derek Kershner

06/02/2022, 4:03 PM
we have ~6 of these up and running, and never experienced this, so its likely something in the stack we dont use.
that looks about as simple as it gets, though
you’ll have to wait on the SST gang, sorry I couldnt be of more help
m

Mischa Spiegelmock

06/02/2022, 4:07 PM
i just opened an issue
thanks no worries
a

Alistair Stead

06/02/2022, 5:43 PM
I’m also experiencing this issue and have been for a few days. I can’t find any related issues in https://github.com/serverless-nextjs/serverless-next.js/issues that is the underlying resource.
d

Derek Kershner

06/02/2022, 6:11 PM
I had two brand new successful deploys yesterday, FWIW.
m

Mischa Spiegelmock

06/02/2022, 6:11 PM
did you create a new stack or just update an existing one?
d

Derek Kershner

06/02/2022, 6:12 PM
all new from the ground up (including app, stacks, and site)
m

Mischa Spiegelmock

06/02/2022, 6:19 PM
hm
a

Alistair Stead

06/02/2022, 8:26 PM
I reverted my deps
@serverless-stack/resources
to
1.1.2
and the deploy is working again. I’ll roll forward through the releases to find where it stops working
f

Frank

06/03/2022, 7:13 PM
@Mischa Spiegelmock @Alistair Stead when this happens, can you try this: 1. Locate the stack in the CloudFormation console 2. Select the
Resources
tab 3. Find
EdgeLambdaBucket
and double check it is the one that’s stuck in IN_PROGRESS state 4. Find
EdgeLambdaBucketProvider
and copy the Physical ID, that’s the name of the Lambda function 5. Locate the
/aws/lambda/Physical ID
log group in CloudWatch log 6. Check the latest couple of log streams and see if you see errors in the log
m

Mischa Spiegelmock

06/03/2022, 7:13 PM
sure will do
@Frank maybe you can try to reproduce? i'm just trying to deploy this https://github.com/jetbridge/sst-prisma
i didn't find a match for the physical ID in CW but I found
/aws/lambda/mish-myapp-frontend-EdgeLambdaBucketProviderCBE2EF-n5Au2yqOFDIN
which has the error:
Copy code
"errorMessage": "Must use import to load ES Module: /var/task/s3-bucket.js\nrequire() of ES modules is not supported.\nrequire() of /var/task/s3-bucket.js from /var/runtime/UserFunction.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.\nInstead rename s3-bucket.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/package.json.\n",
    "code": "ERR_REQUIRE_ESM",
    "stack": [
        "Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/task/s3-bucket.js",
        "require() of ES modules is not supported.",
        "require() of /var/task/s3-bucket.js from /var/runtime/UserFunction.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.",
        "Instead rename s3-bucket.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/package.json.",
        "",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1015:13)",
        "    at Module.load (internal/modules/cjs/loader.js:863:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
        "    at Module.require (internal/modules/cjs/loader.js:887:19)",
        "    at require (internal/modules/cjs/helpers.js:74:18)",
        "    at _tryRequire (/var/runtime/UserFunction.js:75:12)",
        "    at _loadUserApp (/var/runtime/UserFunction.js:95:12)",
        "    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
        "    at Object.<anonymous> (/var/runtime/index.js:43:30)",
        "    at Module._compile (internal/modules/cjs/loader.js:999:30)"
    ]
}

2022-06-02T05:36:47.654Z undefined ERROR Uncaught Exception {"errorType":"Error","errorMessage":"Must use import to load ES Module: /var/task/s3-bucket.js\nrequire() of ES modules is not supported.\nrequire() of /var/task/s3-bucket.js from /var/runtime/UserFunction.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.\nInstead rename s3-bucket.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/package.json.\n","code":"ERR_REQUIRE_ESM","stack":["Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/task/s3-bucket.js","require() of ES modules is not supported.","require() of /var/task/s3-bucket.js from /var/runtime/UserFunction.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.","Instead rename s3-bucket.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/package.json.",""," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1015:13)"," at Module.load (internal/modules/cjs/loader.js:863:32)"," at Function.Module._load (internal/modules/cjs/loader.js:708:14)"," at Module.require (internal/modules/cjs/loader.js:887:19)"," at require (internal/modules/cjs/helpers.js:74:18)"," at _tryRequire (/var/runtime/UserFunction.js:75:12)"," at _loadUserApp (/var/runtime/UserFunction.js:95:12)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object.<anonymous> (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:999:30)"]}
d

Derek Kershner

06/03/2022, 7:31 PM
maybe this is our difference, I am not attempting to use ESM in L@Edge.
p

Patrik Ståhl

06/05/2022, 5:41 PM
reverted as well to
1.1.2
as deployments started to fail
3 Views