Skip to content
Discussion options

You must be logged in to vote

You should not call Next API routes from within getStaticProps (or getStaticPaths) because those API routes do not exist at the time of build (because they haven't been deployed anywhere).

Instead, write your code directly in getStaticProps

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@smootok
Comment options

Answer selected by smootok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants