Arpad
05/27/2022, 7:43 AM<http://example.com/api|example.com/api>
to <http://my-api-domain.com/|my-api-domain.com/>
but I'm wondering if there's any plan on adding this to the current static site resources to automate it a bit.Louis Holley
05/27/2022, 10:07 AMMichael Robellard
05/27/2022, 3:08 PMarda
05/28/2022, 8:41 PMGabriel
05/30/2022, 10:59 AMPaul Swail
05/30/2022, 3:25 PMJohn Kor
05/30/2022, 8:59 PMjohn@pop-os:~/Development/edvisor-io/pricing-lambda$ yarn sst build
yarn run v1.22.15
$ /home/john/Development/edvisor-io/pricing-lambda/node_modules/.bin/sst build
Using stage: john
Preparing your SST app
Synthesizing CDK
Error: There was a problem transpiling the Lambda handler: ✘ [ERROR] Could not resolve "@nestjs/websockets/socket-module"
node_modules/@nestjs/core/nest-application.js:18:115:
18 │ ...ocket-module', () => require('@nestjs/websockets/socket-module'));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@nestjs/websockets/socket-module" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
.. along with other errors regarding other modules (ie. class-transformer
, class-validator
, etc..)Dan Suceava
05/30/2022, 9:44 PMfail: One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.
... I'll get the errors once, then re-deploy and no errors, then next time this error again ... I've tried downgrading back to 1.0.2 and still getting them, so not sure what's causing these ... I'm not even sure it's related to the upgrade. Has anyone seen these?Daniel Gato
05/31/2022, 8:52 AMdaniel-mbp-sayduck-viewer
to daniel-mbp-sayduck-ViewerStack
Anyway to avoid this?Scott
06/01/2022, 1:19 AMCREATE_FAILED | Custom::SSTEdgeLambdaBucket | EdgeLambdaBucket | CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [43be6075-8550-4a85-91a3-e4227206f263]. If you are using the Python cfn-response module,
you may need to update your Lambda function code so that CloudFormation can attach the updated version.
When looking into the cloud watch logs I find:
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)" ] }
Backend stack fails on Custom::SSTScript:
CREATE_FAILED | Custom::SSTScript | ClusterMigrationResource0F3A2EDD | CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [ad1c4d9e-6946-482e-bd9d-f18bb90f6610]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version
When looking into the cloud watch logs I find:
ERROR Invoke Error {"errorType":"SyntaxError","errorMessage":"Unexpected token 'export'","stack":["/var/task/sst_rds_migration_scripts/0001_setupAuthTables.js:1","export const up = async (db) => {","^^^^^^","","SyntaxError: Unexpected token 'export'"," at Object.compileFunction (node:vm:352:18)"," at wrapSafe (node:internal/modules/cjs/loader:1032:15)"," at Module._compile (node:internal/modules/cjs/loader:1067:27)"," at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)"," at Module.load (node:internal/modules/cjs/loader:981:32)"," at Function.Module._load (node:internal/modules/cjs/loader:822:12)"," at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:161:29)"," at ModuleJob.run (node:internal/modules/esm/module_job:195:25)"," at async Promise.all (index 0)"," at async ESMLoader.import (node:internal/modules/esm/loader:337:24)"]}
Kiran Siddagangappa
06/01/2022, 7:16 AMKevin Wright
06/01/2022, 3:52 PMReportBatchItemFailures
responses from lambda. is this enabled with the integration that the Queue construct creates?Austin
06/01/2022, 4:23 PMMischa Spiegelmock
06/01/2022, 6:57 PMTiago Dall'Oca
06/02/2022, 1:51 AMsst start
?Gabriel
06/02/2022, 10:14 AMretention: "two weeks"
but this will throw an error, so it seems it has to be:
retention: "two_weeks"
(same is provided in https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/Api.ts#L245 )Viswa
06/02/2022, 9:28 PMBoris Tane
06/04/2022, 9:57 AMnpx create-serverless-stack my-app --language typescript
and the package.json generated is for a previous version of sst. I'm not sure if this is still the recommended way to bootstrap a new sst app. if it's not anymore, it's still on the marketing website
package.json:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"test": "sst test",
"start": "sst start",
"build": "sst build",
"deploy": "sst deploy",
"remove": "sst remove"
},
"eslintConfig": {
"extends": [
"serverless-stack"
]
},
"devDependencies": {
"@tsconfig/node14": "^1.0.1",
"@types/aws-lambda": "^8.10.70",
"@types/node": "<15.0.0",
"typescript": "4.4.4",
"@serverless-stack/cli": "0.69.7",
"@serverless-stack/resources": "0.69.7",
"aws-cdk-lib": "2.15.0"
},
"dependencies": {}
}
jamlen
06/06/2022, 11:52 AMError: invalid immediate value [object Object]
and it sounds like it has got two different versions of Kysely somehow. This is using Postgres on Aurora.Kevin Wright
06/06/2022, 2:51 PMAdrián Mouly
06/06/2022, 7:31 PMReferenceError: __dirname is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/amouly/Projects/yabble/yabble-serverless/.build/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Jarod Stewart
06/06/2022, 8:11 PM@serverless-stack-slack/web
?Geoffrey Dagley
06/07/2022, 4:25 PMGiorgio
06/07/2022, 6:05 PMAdrián Mouly
06/07/2022, 8:09 PMdev
?Adrián Mouly
06/07/2022, 10:25 PMAdrián Mouly
06/08/2022, 9:27 PMmessage group id
, but it doesn’t work.
I have this config on my EB Rule:
targets: {
targetOne: {
type: 'queue',
queue: subsystemFinishedQueue,
cdk: {
target: {
retryAttempts: 1,
messageGroupId: '$.detail.surveyQuestionId',
},
},
},
},
jamlen
06/09/2022, 1:41 PMTim
06/09/2022, 9:51 PMsst start
or sst deploy
, which turned out to be because the local environment was running node 16 and the deployed lambda was using node 14. would it be possible to have sst warn/error when sst start
is running with the wrong runtime version?Adrián Mouly
06/10/2022, 12:05 AM