Sean Matheson
06/06/2022, 9:31 AMrequire
to dynamically import, and import(depPath)
is async. Anyone know of a way around this limitation?Nathan
06/06/2022, 10:57 AMKarolis Stulgys
06/06/2022, 1:27 PMwebhook
endpoint validation. I have secret and I receive the stripe-signature, still getting 400. This might has todo with the event.body
?
try {
if (!sig || !endpointSecret) return { statusCode: 400 };
e = stripe.webhooks.constructEvent(
event.body as string,
sig as string,
endpointSecret
);
} catch (err) {
return { statusCode: 400 };
}
Max Liu
06/06/2022, 2:08 PMSeth Geoghegan
06/06/2022, 5:39 PMJordan Bryan
06/06/2022, 7:05 PMnpm install @serverless-stack/cli --save-exact
, Iām seeing
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jordanbryan/.npm/_logs/2022-06-06T18_33_06_226Z-debug-0.log
Did I miss a step?Ross Coundon
06/06/2022, 8:00 PMMATCH() AGAINST() ?
Santiago Castro
06/06/2022, 9:28 PMSam Hulick
06/06/2022, 10:33 PMephemeralStorageSize: Size.gibibytes(4),
and SST says it doesnāt detect any infrastructure changes. š¤
EDIT: oh.. shoot. the setting is completely ignored. I tried creating a new Lambda func with 1024MB of ephemeral storage and I see in AWS itās 512MB. I am on SST 1.1.2 though, and 1.2.16 is out, so Iāll try upgrading later when I get homeMax Liu
06/07/2022, 1:48 AMbuild
command of this example: https://github.com/serverless-stack/serverless-stack/tree/master/examples/nextjs-app I just simply pull the folder and did npm install
, then npm buld
. It gives me this error:
> nextjs-app@0.0.0 build
> sst build
Using stage: service-deployer
Preparing your SST app
Synthesizing CDK
Building Next.js site frontend
Error: Command failed with ENOENT: ./node_modules/.bin/next build
spawn ./node_modules/.bin/next ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn ./node_modules/.bin/next',
path: './node_modules/.bin/next',
spawnargs: [ 'build' ],
originalMessage: 'spawn ./node_modules/.bin/next ENOENT',
shortMessage: 'Command failed with ENOENT: ./node_modules/.bin/next build\n' +
'spawn ./node_modules/.bin/next ENOENT',
command: './node_modules/.bin/next build',
escapedCommand: '"./node_modules/.bin/next" build',
exitCode: undefined,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: '',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
There was a problem building the "Site" NextjsSite.
There was an error synthesizing your app.
Iām using node@v16.15.1Jason S
06/07/2022, 5:21 AM0.69.7
Kenny
06/07/2022, 10:31 AMsite.url
that's in the FrontendStack.
export function AuthApiStack({ stack, app }) {
const { bucket } = use(StorageStack);
const { table } = use(StorageStack); //This new ApiStack references the table resource from the StorageStack that we created previously.
const auth = new Auth(stack, "Auth", {
login: ["email"],
cdk: {
userPoolClient: {
supportedIdentityProviders: [
cognito.UserPoolClientIdentityProvider.GOOGLE,
cognito.UserPoolClientIdentityProvider.COGNITO,
],
oAuth: {
callbackUrls: [
app.stage === "prod"
? "<https://dfwwlqfwiq3c2.cloudfront.net/>"
: "<http://localhost:3000>",
],
logoutUrls: [
app.stage === "prod"
? "<https://dfwwlqfwiq3c2.cloudfront.net/>"
: "<http://localhost:3000>",
],
},
},
},
}); ...
I want to replace the cloudfront urls with site.url but this stack is in use buy the FrontendStack
export function FrontendStack({ stack, app }) {
const { auth, api, domain } = use(AuthApiStack);
const { bucket } = use(StorageStack);
const site = new ReactStaticSite(stack, "ReactSite", {
path: "frontend",
environment: {
REACT_APP_API_URL: api.customDomainUrl || api.url,
REACT_APP_REGION: app.region,
REACT_APP_BUCKET: bucket.bucketName,
REACT_APP_USER_POOL_ID: auth.userPoolId,
REACT_APP_IDENTITY_POOL_ID: auth.cognitoIdentityPoolId,
REACT_APP_USER_POOL_CLIENT_ID: auth.userPoolClientId,
REACT_APP_API_STAGE: app.stage,
REACT_APP_COGNITO_DOMAIN: domain.domainName,
},
});
stack.addOutputs({
SiteUrl: site.url,
});
}
My frontend React also needs SiteUrl but I cans easily pass it through the environment variables.Andrew Brown
06/07/2022, 11:13 AMSantiago Castro
06/07/2022, 2:40 PMDaniel Ashcraft
06/07/2022, 2:57 PMSyntaxError: The requested module '@serverless-stack/resources' does not provide an export named 'TableFieldType'
lib/index.js:632
import { Table as Table2, TableFieldType } from "@serverless-stack/resources";
Anyone have experience with this? Seems to be a module resolution issue but it's inside of the libAlex Price
06/07/2022, 4:41 PMAWS::Route53::RecordSet
. It just times out š Can anyone let me know what comes after that so I can debug? šShubham Sinha
06/07/2022, 4:56 PM{
"status": 403,
"headers": {
"content-length": "23",
"content-type": "application/json"
},
"body": "{\"message\":\"Forbidden\"}"
}
I'm following this guide: https://serverless-stack.com/chapters/adding-auth-to-our-serverless-app.html#create-a-stack but can't find signInAliases as wellFJ
06/07/2022, 5:09 PMLambert Chu
06/07/2022, 5:51 PMprocess.env
to load variables:
const twitterClientId = process.env.TWITTER_CLIENT_ID;
And now get errors like this:
{
"errorType": "Error",
"errorMessage": "Missing TWITTER_CLIENT_ID environment variable",
"stack": [
"Error: Missing TWITTER_CLIENT_ID environment variable",
...
}
Noah D
06/08/2022, 12:05 AMTim
06/08/2022, 12:30 AMSantiago Pergamo
06/08/2022, 11:17 AMserverless-webpack
to get small-sized lambdas and when I migrated a simple project over SST, I found that with SST I get bigger sized lambdas.Francis Menguito
06/08/2022, 11:49 AMstage
inside a lambda function handler?sforman
06/08/2022, 1:58 PMFrancis Menguito
06/08/2022, 3:38 PMYou can mark the path "md5" as external to exclude it from the bundle, which will remove this error.
I tried to use it on one of my function handlersLambert Chu
06/08/2022, 4:54 PMNODE_ENV
environment variable set by default? The value is always undefined for us, even when including it in the stack environmentsSam Frampton
06/08/2022, 6:23 PMGraham Tremper
06/08/2022, 6:47 PMMichael Holroyd
06/08/2022, 6:51 PMAdrian Schweizer
06/08/2022, 10:54 PM