Hello I have many nextjs-site constructs. On build...
# help
b
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
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
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?