JJ Teoh
12/24/2021, 3:38 AMsst.Queue
?
const queue = new sst.Queue(this, queueName, {
consumer: 'src/queueConsumer.main', // this handler expects a secret from env var
})
Davide Ungari
12/26/2021, 10:10 PMBuilding Next.js site frontend
Error: There was a problem building the "site" NextjsSite.
at NextjsSite.buildApp (/tmp/seed/source/node_modules/@serverless-stack/resources/src/NextjsSite.ts:607:13)
at new NextjsSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/NextjsSite.ts:148:16)
at new MainStack (/tmp/seed/source/stacks/MainStack.ts:21:18)
at Object.main (/tmp/seed/source/stacks/index.ts:5:3)
at Object.<anonymous> (/tmp/seed/source/.build/run.js:94:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Error: Subprocess exited with error 1
at ChildProcess.<anonymous> (/tmp/seed/source/node_modules/aws-cdk/lib/api/cxapp/exec.ts:127:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
There was an error synthesizing your app.
Any idea how to debug what is going on?Sam Hulick
12/28/2021, 11:37 PMDavide Ungari
12/29/2021, 12:17 AM====================
🛠 Compile
====================
$ cd /tmp/seed/source
INFO: before_compile hook not found. You can define it in your build spec.
INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
INFO: Looking for package.json...
$ npm install
34.90 s
====================
🧪 Unit Test
====================
INFO: Unit tests are disabled. You can enable them in the app settings.
INFO: Learn more about running tests - seed.run/docs/running-tests
====================
📦 Build
====================
$ cd /tmp/seed/source
INFO: before_build hook not found. You can define it in your build spec.
INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
$ npx sst build --stage develop --region eu-west-1 --verbose
But the npx sst build
is not running npm install
also in the NextJS sub-folder so it is missing the next
executable and this failure appears in the log like:
Building Next.js site frontend
Error: There was a problem building the "site" NextjsSite.
What is supposed to be the build process for SST apps based on NextjsSite?Guy Shechter
12/29/2021, 6:05 AMIt seems you are configuring custom domains for you URL. And SST is not able to find the hosted zone "<http://qa.mydomain.com|qa.mydomain.com>" in your AWS Route 53 account. Please double check and make sure the zone exists, or pass in a different zone.
thoughts?Sam Hulick
12/30/2021, 4:49 AM[Object]
? like maybe 5-6 levels deep, maybe? (in the SST console)Adrián Mouly
12/30/2021, 4:05 PMSeth Geoghegan
12/30/2021, 4:23 PMnpm sst remove
and it's been stuck in the DELETE_IN_PROGRESS
stage for about 18 minutes while trying to remove the resources related to the SST.Script construct.Samir Baid
12/30/2021, 4:41 PMAlistair Stead
12/30/2021, 7:45 PMturborepos
with SST? I’ve been using it on a number of projects and it brought lots of benefits both for dev and CI. I’ve been working with it on an SST project and NextJSSite but it has highlighted a number of complexities/diversions from practices in other projects. It would be great to be able to use this or other such solutions to speed up the build step for NextJSSites currently it is built twice on every deploy. Could SST leverage the build hashes to prevent this? Also the cwd
during the build process and also the loading of additional next and eslint config causes some issues or at least confusion and I can’t find a way to resolve this.Alistair Stead
12/30/2021, 7:46 PMgio
01/03/2022, 9:35 AMnpx sst update 0.56.0
.
I expect an update to my project folder and my package.json, but package.json keep old version 0.52.0. Am I using in properly way this command?
$ npx sst update 0.56.0
Updating @serverless-stack/cli to 0.56.0
Updating @serverless-stack/resources to 0.56.0
Updating @aws-cdk/aws-ses@1.126.0
Updating @aws-cdk/aws-ses-actions@1.126.0
Updating @aws-cdk/aws-stepfunctions@1.126.0
Updating @aws-cdk/aws-stepfunctions-tasks@1.126.0
SST: 0.52.0
CDK: 1.126.0
Adam Fanello
01/04/2022, 4:14 PMPhil Astle
01/04/2022, 5:53 PMSean Matheson
01/05/2022, 9:00 AMTypeError: Cannot read properties of undefined (reading 'routes')
at index.a7e2d5b4.js:formatted:223
at vendor.b5a71c7d.js:formatted:27543
at GC (vendor.b5a71c7d.js:formatted:27473)
at GC (vendor.b5a71c7d.js:formatted:27479)
at mMe (vendor.b5a71c7d.js:formatted:27444)
at Object.tt.retry [as queryFn] (index.a7e2d5b4.js:formatted:218)
Daniel Gato
01/05/2022, 9:18 AMDaniel Gato
01/05/2022, 10:17 AMRoss Coundon
01/05/2022, 2:51 PMsst start
which references the sharp library.
It's on a Windows platform, we've tried specifying the sharp dependency in bundle.nodeModules
(and in bundle.externalModules
) but we're getting the error when the function runs:
Uncaught Exception {"errorType":"Error","errorMessage":"\nSomething went wrong installing the \"sharp\" module\n\nCannot find module '../build/Release/sharp-win32-x64.node'\nRequire stack:\n- C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\utils\\UserFunction.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\index.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\bin\\index.js\n\nPossible solutions:\n- Install with the --verbose flag and look for errors: \"npm install --ignore-scripts=false --verbose sharp\"\n- Install for the current runtime: \"npm install --platform=win32 --arch=x64 sharp\"\n- Consult the installation documentation: <https://sharp.pixelplumbing.com/install>","stack":["Error: ","Something went wrong installing the \"sharp\" module","","Cannot find module '../build/Release/sharp-win32-x64.node'","Require
stack:","- C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\utils\\UserFunction.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\index.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\bin\\index.js","","Possible solutions:","- Install with the --verbose flag and look for errors: \"npm install --ignore-scripts=false --verbose sharp\"","- Install for the current runtime: \"npm install --platform=win32 --arch=x64 sharp\"","- Consult the installation documentation: <https://sharp.pixelplumbing.com/install>"," at node_modules/sharp/lib/sharp.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:39896:13)"," at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)"," at node_modules/sharp/lib/constructor.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:39909:5)"," at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)"," at node_modules/sharp/lib/index.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:43471:17)"," at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)"," at Object.<anonymous> (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:75153:31)"," at Module._compile (internal/modules/cjs/loader.js:1085:14)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)"," at Module.load (internal/modules/cjs/loader.js:950:32)"]}
How should we go about specifying this for sst start
?Ross Coundon
01/05/2022, 2:53 PMsst start
now that the service builds the function code on 1st run, some feedback in the console to say this is happening. E.g. Compiling function xxx for first invocation... and then Compilation of function xxx completed
At the moment it's not clear if anything is happening and if the function has a lot of dependencies, it can take a while and as a developer you don't know if anything is going on.Seth Geoghegan
01/06/2022, 2:32 PMDaniel Gato
01/06/2022, 6:07 PMserverless
command. Are the best practices for the Serverless Framework or for SST? This is specially confusing as the Best Practices chapter comes before Serverless Framework chapterManuel Villafañe
01/06/2022, 8:19 PMcolin
01/07/2022, 3:29 PMnpm test
and tests will fail where as they work on version 0.43.3
repo: https://github.com/colin-h/sst-jest-bugSeth Geoghegan
01/07/2022, 3:55 PMsst start
again, which seems to do the trick, but this behavior is new to me. I'm on SST 0.56.2
Error: Unable to evaluate guard 'cond' in transition for event 'done.invoke.(machine).building:invocation[0]' in state node '(machine).building':
Cannot read property 'length' of undefined
at StateNode.next (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:587:17)
at StateNode.transitionLeafNode (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:454:26)
at StateNode._transition (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:547:19)
at StateNode.transition (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:818:32)
at /Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:706:28
at Object.provide (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/serviceScope.js:12:16)
at Interpreter.nextState (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:705:34)
at /Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:108:31
at Scheduler.process (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/scheduler.js:69:7)
at Scheduler.schedule (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/scheduler.js:48:10)
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
Adam Fanello
01/07/2022, 4:19 PMsst update
and sst add-cdk
commands are incompatible with NPM (and yarn?) Workspaces. These sst commands need to be run from the package with sst, but with workspaces all NPM commands must be run at the workspace level (with the -w option to specify the target package).Drew
01/07/2022, 7:01 PMYeltrah
01/09/2022, 5:41 AMus-east-1
I notice the CDK formation and the S3 sitebucket are created in eu-west-1
which must be the default region I set for the AWS CLI. How can I ensure that the CDK + S3 and really all related services for that deployment are all created in the same region?Yeltrah
01/09/2022, 11:30 AMus-east-1
. So I’m using the following command sst deploy "--stage" "master" "--region" "eu-west-1"
and I have a AWS certificate ARN in eu-west-1
. I’m also setting the REGION to eu-west-1
and I can see this is all set properly. However during the deployment I see the following error
Error: Distribution certificates must be in the us-east-1 region and the certificate you provided is in eu-west-1.Is there another place or config where this needs to be set so that it deploys to the
eu-west-1
region and not the us-east-1
as it appears to be doing based on the error.