I’m noticing seed seems to be building my Nextjs t...
# seed
c
I’m noticing seed seems to be building my Nextjs twice, first building normally, then a message about missing context information appears:
Copy code
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
   (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
Some context information is missing. Fetching...
Reading hosted zone 133783874104:eu-west-1:<http://my-own-domain.com|my-own-domain.com>
Found the following zones
& then building again, any pointers on how to stop this? builds are already taking 20 odd minutes…
f
Hey @Cass Winfrey, CDK has this concept of
context
. So some times CDK needs to know about certain information in your AWS account. And it would make AWS SDK calls to fetch the information (ie. in this case hosted zone information):
Copy code
Some context information is missing. Fetching...
Reading hosted zone 133783874104:eu-west-1:<http://my-own-domain.com|my-own-domain.com>
Found the following zones
It will then caches the fetched info inside
cdk.context.json
. Then CDK will try to build again with the fetched info.
You are supposed to commit the
cdk.context.json
file into your repo. But since this file is updated inside SEED, it’s not being commited.
Can you try running
sst build
on your local with the same
--stage
and
AWS_PROFILE
as the stage on SEED, and then commit the
cdk.context.json
file?
c
Ah okay, wasn’t aware of that - has fixed it, cheers ^^