Mohiuddin Sumon
05/20/2022, 10:48 AMBjorn Theart
05/20/2022, 11:33 AMShubham Sinha
05/20/2022, 12:38 PMGiorgio Galante
05/20/2022, 1:14 PMNathan
05/20/2022, 1:29 PMEdward Asquith
05/20/2022, 3:31 PMRoss Gerbasi
05/20/2022, 3:59 PMnpm i
does @graphql-tools/merge
just need to be bumped to 6.2.17
? dependencies suck 😕Louis Holley
05/20/2022, 4:41 PMEnsure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
<https://yarnpkg.com/en/docs/selective-version-resolutions>
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
does anyone know how to resolve it?David Garcia
05/20/2022, 6:27 PMsst.Stack
in sst v0.45.2 and cdk v 1.125.0
I'm trying to create a Template
from the stack in my test and it's saying
Type 'NewStack' is missing the following properties from type 'Stack': regionalFact, bundlingRequiredSam Hulick
05/20/2022, 6:35 PMapp.stack(WebAppStack, { stackName: 'web-app' });
it complains about $stage
not being present. but you can’t just do '$stage-web-app'
either. the instructions from CDK seem odd 🤔 so I assume you just have to do this?
app.stack(WebAppStack, { stackName: `${app.stage}-web-app` });
Klaus
05/20/2022, 9:41 PMimport { StackContext, Api } from "@serverless-stack/resources";
export function MyStack({ stack }: StackContext) {
new Api(stack, "api", {
routes: {
"GET /": "functions/lambda.handler",
},
});
}
This made me wonder, if Lamdba life-debugging
would also work without any API gateway involved.Patrik Ståhl
05/21/2022, 7:41 AMNathan
05/21/2022, 1:39 PMJason Cline
05/21/2022, 5:03 PMAdrian Schweizer
05/21/2022, 8:05 PMoutaTiME
05/21/2022, 9:13 PMchrome-aws-lambda
working with nodejs16.x
when I deploy it (locally it works without problems), did anyone get it? If I use version 14 of node it works perfectly, I attach the error message:
"Failed to launch the browser process!\n/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: <https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md>\n",
"stack": [
"Error: Failed to launch the browser process!",
"/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory",
"",
"",
"TROUBLESHOOTING: <https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md>",
"",
" at onClose (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)",
" at Interface.<anonymous> (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)",
" at Interface.emit (node:events:532:35)",
" at Interface.close (node:readline:586:8)",
" at Socket.onend (node:readline:277:10)",
" at Socket.emit (node:events:532:35)",
" at endReadableNT (node:internal/streams/readable:1346:12)",
" at processTicksAndRejections (node:internal/process/task_queues:83:21)"
Maybe https://github.com/alixaxel/chrome-aws-lambda / https://github.com/shelfio/chrome-aws-lambda-layer doesn’t support node 16 yet? 🤔
If you try to deploy the example (https://github.com/serverless-stack/serverless-stack/tree/master/examples/layer-chrome-aws-lambda) you will see the error that I am telling youAndrea Sciutto
05/22/2022, 4:49 AM--account
property to tell sst which account to use. Seems like sst wants to use it's own way of authenticating cdk calls. Are there workarounds or is sst going to support CDK v2 way of selecting region/account?Uncharted
05/22/2022, 11:04 AMconst authHandler = new sst.Function(stack, 'AuthorizerFn', {
handler: 'src/authorizer.authorize',
});
and in api
authorizers: {
LambdaAuthorizer: {
type: 'lambda',
function: authHandler,
resultsCacheTtl: '0 seconds',
},
},
Kevin Grimm
05/22/2022, 12:59 PMpublic
(same level as pages
):
public/
- assets/
- img/
- img1.png
- img2.png
- styles/
- static/
- favicons/
- android-chrome-192x192.png
- android-chrome-512x512.png
- apple-touch-icon.png
- favicon-16x16.png
- favicon-32x32.png
- favicon.ico
- site.webmanifest
And the relevant code
// _app.js
// imports/return*
<Head>
<meta content="width=device-width, initial-scale=1" name="viewport" />
</Head>
// _document.js
import Document, { Html, Head, Main, NextScript } from 'next/document';
class MyDocument extends Document {
render() {
return (
<Html lang="en" className="scroll-smooth">
<Head>
<link
rel="apple-touch-icon"
sizes="76x76"
href="/static/favicons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/static/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/static/favicons/favicon-16x16.png"
/>
<link rel="manifest" href="/static/favicons/site.webmanifest" />
<meta name="msapplication-TileColor" content="#000000" />
<meta name="theme-color" content="#000000" />
</Head>
<Main />
<NextScript />
</Html>
);
}
}
export default MyDocument;
// index.js
<Head>
<title>Site Name</title>
<meta name="robots" content="follow, index" />
<meta
name="description"
content="Site description"
/>
<meta propetty="og:url" content="<https://websiet.com>" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Site Name" />
<meta
property="og:description"
content="Site description"
/>
<meta property="og:title" content="Site Name" />
</Head>
Jason S
05/23/2022, 3:41 AMgligor
05/23/2022, 9:19 AMAdrian Schweizer
05/23/2022, 10:12 AMFrancis Menguito
05/23/2022, 11:12 AMexport const list: APIGatewayProxyHandlerV2 = async (
event: APIGatewayProxyEventV2
) => {
return {
statusCode: 200,
headers: { "Content-Type": "text/plain" },
body: `Hello, World! Your request was received at ${event.requestContext.time}.`,
};
};
const api = new Api(ctx.stack, "Api", {
routes: {
...customer_routes,
},
defaults: {
function: {
environment: {
storesTableName: ddb.storesTable.tableName,
},
},
},
});
Francis Menguito
05/23/2022, 12:04 PMis not authorized to perform: dynamodb:Query on resource
My lambda function cannot query my DynamoDBsforman
05/23/2022, 2:28 PMgraphql: ^14.0.0 || ^15.0.0
, but not version 16+. From what I can tell, these are all updated on their respective github repos, but not included when installing the serverless stack dependencies.
├─┬ @serverless-stack/cli@1.1.2
│ └─┬ @graphql-codegen/cli@2.6.2
│ ├─┬ @graphql-codegen/core@2.5.1
│ │ └── graphql@16.5.0 deduped invalid: "^14.0.0 || ^15.0.0" from node_modules/@serverless-stack/resources/node_modules/@graphql-tools/merge
│ ├─┬ @graphql-codegen/plugin-helpers@2.4.2
│ │ └── graphql@16.5.0 deduped invalid: "^14.0.0 || ^15.0.0" from node_modules/@serverless-stack/resources/node_modules/@graphql-tools/merge
│ ├─┬ @graphql-tools/apollo-engine-loader@7.2.18
│ │ └── graphql@16.5.0 deduped invalid: "^14.0.0 || ^15.0.0" from node_modules/@serverless-stack/resources/node_modules/@graphql-tools/merge
Error I'm getting is:
ERROR Runtime.UnhandledPromiseRejection: Error: Cannot use GraphQLSchema "{ __validationErrors: undefined, description: undefined, extensions: {}, astNode: { kind: "SchemaDefinition", operationTypes: [Array] }, extensionASTNodes: [], _queryType: Query, _mutationType: undefined, _subscriptionType: undefined, _directives: [@include, @skip, @deprecated, @specifiedBy], _typeMap: { Query: Query, String: String, Boolean: Boolean, __Schema: __Schema, __Type: __Type, __TypeKind: __TypeKind, __Field: __Field, __InputValue: __InputValue, __EnumValue: __EnumValue, __Directive: __Directive, __DirectiveLocation: __DirectiveLocation }, _subTypeMap: {}, _implementationsMap: {} }" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
<https://yarnpkg.com/en/docs/selective-version-resolutions>
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
I've tried installing graphql 15.8.0 and using resolutions in my package.json files, none seem to solve the issue.
Any ideas?Neil Balcombe
05/23/2022, 2:52 PMaws cognito-identity get-id --identity-pool-id us-east-1:<id hidden>
Gives the following error...
An error occurred (ResourceNotFoundException) when calling the GetId operation: IdentityPool 'us-east-1:<id hidden>' not found.
I'm not sure if this is a me thing or an AWS thing. Any help/pointers very much appreciated.Karolis Stulgys
05/23/2022, 4:32 PMconnect
handler and send a message or how is that done?Geoff Seemueller
05/23/2022, 5:11 PMJeff Hanna
05/23/2022, 5:46 PMDavid Garcia
05/23/2022, 7:31 PM