Kabo Mekgwe
06/15/2022, 5:42 PMAshishkumar Pandey
06/15/2022, 5:54 PMDerek Curtis
06/15/2022, 6:28 PMREACT_APP_
. The frontend is using a React site, but it was not created with create-react-app
. I have added @serverless-stack/static-site-env
to the frontend project and I have added sst-env --
to the start command. I run npx sst start --profile sandbox --stage sandbox
on my root project and then run npm run start
in my frontend project. None of the REACT_APP_
environment variables have values in the frontend project. Is this because I am not using create-react-app
? If so, is there a way I can get these values passed to the frontend?Eric Ti Yu Chiang
06/15/2022, 7:00 PM> npx sst start
Using stage: eric
Preparing your SST app
=======================
Deploying debug stack
=======================
Deploying stacks
✅ eric-notes-debug-stack (no changes)
Stack eric-notes-debug-stack
Status: no changes
Outputs:
BucketArn: arn:aws:s3:::eric-notes-debug-stack-bucket83908e77-1t8nnnx6tioir
BucketName: eric-notes-debug-stack-bucket83908e77-1t8nnnx6tioir
Endpoint: <wss://c4a03wehy6.execute-api.us-east-2.amazonaws.com/eric>
===============
Deploying app
===============
TypeError: app.setDefaultFunctionProps is not a function
at Module.default (file:///home/eric/code/serixscorpio/notes/.build/lib/index.js:23:7)
at file:///home/eric/code/serixscorpio/notes/.build/run.mjs:92:16
There was an error synthesizing your app.
I think the only thing I modified from the hello world was changing import { App } from "@..."
to import App from "@.."
to address the commonjs module errorMitchell Cravens
06/15/2022, 7:20 PMAli Sharabiani
06/15/2022, 11:20 PMsst deploy
and test the lambda, I get the following error (happens at client.send()
__dirname is not defined\nPlease check if you have installed \"@aws-sdk/signature-v4-crt\" package explicitly. \nFor more information please go to <https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt>
The full detail of the issue is listed here: https://github.com/aws/aws-sdk-js-v3/issues/3692
I suspect something is wrong when sst tries to bundle all packages
I have tried:
• deleting node_modules and package-lock
• clearing npm cache
• tried with NodeJs 14 and NodeJs 16
• tried setting the bundle format to cjs
NOTE: in this case I get a different error: AWS CRT binary not present in any of the following locations
• these are in my dependencies in package.json and already installed:
◦ "@aws-sdk/client-eventbridge": "^3.110.0,
◦ "@aws-sdk/signature-v4-crt": "^3.110.0"
,
• these are in my devDependencies in package.json:
◦ "@serverless-stack-slack/cli": "^1.2.3",
◦ "@serverless-stack/resources": "^1.2.3"
,
Can someone help me?Jon Holman
06/16/2022, 2:01 AMPavan Kumar
06/16/2022, 3:20 AMfromBucketArn
in sst.Bucket
ts type definition)Arpad
06/16/2022, 9:44 AMDavid
06/16/2022, 11:36 AMViswa
06/16/2022, 3:49 PMSyntaxError: Cannot use 'import.meta' outside a module
> 1 | import * as sst from "@serverless-stack/resources";
Is there any jest dependency need be explicitly added after upgrading to v1?Alex Rayo
06/16/2022, 4:12 PMKarolis Stulgys
06/16/2022, 4:30 PMEric
06/16/2022, 11:22 PMResource handler returned message: "'MemorySize' value failed to satisfy constraint: Member must have value less than or equal to 3008 (Service: Lambda, Status Code: 400, Request ID: 0cdfc07e-23ef-4ee4-b6fe-e5dbbe8e783d)" (RequestToken: 86450038-ede7-b61c-aa56-74fc40b8476e, HandlerErrorCode: InvalidRequest)
Eric
06/16/2022, 11:23 PMEric
06/16/2022, 11:35 PMBob Wall
06/16/2022, 11:59 PMthdxr
06/17/2022, 4:05 AMSakar
06/17/2022, 8:00 AMHi, while running npm run start, I get this error ===============
Deploying app
===============
Error: StackDuplicates: Attempting to initialize stack MyStack several times
at stack (file:///E:/ec-website/ec-serverless/ec-website-restapi/node_modules/@serverless-stack/resources/dist/FunctionalStack.js:8:15)
at App.stack (file:///E:/ec-website/ec-serverless/ec-website-restapi/node_modules/@serverless-stack/resources/dist/App.js:284:16)
at Module.default (file:///E:/ec-website/ec-serverless/ec-website-restapi/.build/lib/index.js:33:7)
at file:///E:/ec-website/ec-serverless/ec-website-restapi/.build/run.mjs:92:16
Sakar
06/17/2022, 9:48 AM${app.stage}-ec-website-restapi
});
Stack dev-ec-website-restapi
Status: deployed
Outputs:
ApiEndpoint: https://6wrravgev5.execute-api.ap-south-1.amazonaws.com
==========================
Starting Live Lambda Dev
==========================
SST Console: https://console.serverless-stack.com/ec-website-restapi/dev/local
ValidationError: Stack 'dev-ec-website-restapi-MyStack' does not exist
at Request.extractError (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\protocol\query.js50:29)
at Request.callListeners (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\sequential executor.js106:20)
at Request.emit (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\sequential executor.js78:10)
at Request.emit (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js686:14)
at Request.transition (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js22:10)
at AcceptorStateMachine.runTo (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\state machine.js14:12)
at E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\state machine.js26:10
at Request.<anonymous> (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js38:9)
at Request.<anonymous> (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js688:12)
at Request.callListeners (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\sequential executor.js116:18)
at Request.emit (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\sequential executor.js78:10)
at Request.emit (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js686:14)
at Request.transition (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js22:10)
at AcceptorStateMachine.runTo (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\state machine.js14:12)
at E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\state machine.js26:10
at Request.<anonymous> (E\ec website\ec serverless\ec website restapi\node modules\aws sdk\lib\request.js38:9)
what Iam missing?Sakar
06/17/2022, 2:54 PMSam Hulick
06/17/2022, 9:30 PM'POST /reels/{reelId}/links': {
function: {
handler: `${restFuncBasePath}/create-share-link.main`,
functionName: `${this.stackName}-createShareLink`,
},
},
'POST /reels/{reelId}/versions': {
function: {
handler: `${restFuncBasePath}/duplicate-reel-version.main`,
functionName: `${this.stackName}-duplicateReelVersion`,
},
},
The default naming convention is really difficult to read (e.g. dev-microservices-api-ree-LambdaPATCHreelsreelId18-oXcbK4Ndqlga
)Paul Stone
06/18/2022, 1:58 AMfile:///C:/Users/User/source/sst/nextjs-app/.build/lib/index.js:20
var site = new NextjsSite(stack, "Site", {
^
ReferenceError: NextjsSite is not defined
at file:///C:/Users/User/source/sst/nextjs-app/.build/lib/index.js:20:12
at ModuleJob.run (node:internal/modules/esm/module_job:197:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
at async file:///C:/Users/User/source/sst/nextjs-app/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.mjs:20:17
I also tried the react example on the site, but it does not seem to create the correct folders referenced in the example - the backend/ folder is missing..Karolis Stulgys
06/18/2022, 6:44 AMKarolis Stulgys
06/18/2022, 7:44 AMKarolis Stulgys
06/18/2022, 10:33 AMT Indie
06/18/2022, 12:41 PMError: Command failed with exit code 1: ./node_modules/.bin/next build
Failed to compile.
./next.config.js:1:27
Type error: Rest parameter 'args' implicitly has an 'any[]' type.
> 1 | module.exports = function(...args) {
| ^
2 | let original = require('./next.config.original.1655555811863.js');
3 | const finalConfig = {};
4 | const target = { target: 'serverless' };
info - Using webpack 5. Reason: Enabled by default <https://nextjs.org/docs/messages/webpack5>
info - Checking validity of types...
at makeError (/Users/user/serveless-stack/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/user/serveless-stack/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Builder.build (/Users/user/serveless-stack/node_modules/@sls-next/lambda-at-edge/dist/build.js:377:13) {
shortMessage: 'Command failed with exit code 1: ./node_modules/.bin/next build',
command: './node_modules/.bin/next build',
escapedCommand: '"./node_modules/.bin/next" build',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: 'info - Using webpack 5. Reason: Enabled by default <https://nextjs.org/docs/messages/webpack5>\n' +
according to https://github.com/aws-amplify/amplify-hosting/issues/2427 the { target: ‘serverless’ }; is no longer supported by it gets inserted automatically by the sst stackPaul Stone
06/18/2022, 12:50 PMMagnus Wahlstrand
06/18/2022, 1:35 PMKarolis Stulgys
06/18/2022, 1:47 PM<Error>
<Code>RequestHeaderSectionTooLarge</Code>
<Message>Your request header section exceeds the maximum allowed size.</Message>
<MaxSizeAllowed>8192</MaxSizeAllowed>
<RequestId>E88MDT8H4CPPMNVN</RequestId>
<HostId>CDlO4tQlpbRPoTOA2xZfMxYakm6+wwjTSa9TT6PN4jT/+La91ss48d7W18eaL8IjVy4RQQGnD4s=</HostId>
</Error>