Mischa Spiegelmock
06/01/2022, 11:40 PMDerek Kershner
06/02/2022, 3:48 PMMischa Spiegelmock
06/02/2022, 3:49 PMDerek Kershner
06/02/2022, 3:49 PMMischa Spiegelmock
06/02/2022, 3:50 PMDerek Kershner
06/02/2022, 3:51 PMMischa Spiegelmock
06/02/2022, 4:00 PMMischa Spiegelmock
06/02/2022, 4:00 PMDerek Kershner
06/02/2022, 4:00 PMMischa Spiegelmock
06/02/2022, 4:01 PMDerek Kershner
06/02/2022, 4:01 PMDerek Kershner
06/02/2022, 4:01 PMMischa Spiegelmock
06/02/2022, 4:02 PMDerek Kershner
06/02/2022, 4:03 PMDerek Kershner
06/02/2022, 4:03 PMDerek Kershner
06/02/2022, 4:07 PMMischa Spiegelmock
06/02/2022, 4:07 PMMischa Spiegelmock
06/02/2022, 4:07 PMAlistair Stead
06/02/2022, 5:43 PMDerek Kershner
06/02/2022, 6:11 PMMischa Spiegelmock
06/02/2022, 6:11 PMDerek Kershner
06/02/2022, 6:12 PMMischa Spiegelmock
06/02/2022, 6:19 PMAlistair Stead
06/02/2022, 8:26 PM@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 workingFrank
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 logMischa Spiegelmock
06/03/2022, 7:13 PMMischa Spiegelmock
06/03/2022, 7:14 PMMischa Spiegelmock
06/03/2022, 7:16 PM/aws/lambda/mish-myapp-frontend-EdgeLambdaBucketProviderCBE2EF-n5Au2yqOFDIN
which has the 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)"
]
}
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)"]}
Derek Kershner
06/03/2022, 7:31 PMPatrik Ståhl
06/05/2022, 5:41 PM1.1.2
as deployments started to fail