https://serverless-stack.com/ logo
#help
Title
# help
b

Bshr Ramadan

04/25/2022, 10:17 PM
Hello I have many nextjs-site constructs. On building, I noticed that often many of them is being built a twice, and that causing the deployment taking a long time (about 45 mins) can any help me to debug this?
f

Frank

04/27/2022, 8:23 PM
Hey @Bshr Ramadan, can you check if the build generates a
cdk.context.json
file? If it is, make sure the file is commited to git.
To add some context, SST/CDK sometimes needs to fetch some information about ur AWS account, and that information is cached inside
cdk.context.json
. If the cache file does not exist, CDK would build once, write to the cache, and builds again.
b

Bshr Ramadan

04/28/2022, 3:57 PM
Oh, actually I don't commit it to git, I think that's the problem I will try that. thank you @Frank
But if I have a different aws account for each stage can I have multiple
cdk.context.json
files?
Or all the information will be exist in same file?