Next.js Discord

Discord Forum

Error when building next js app (Next 13.4.1)

Unanswered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
Im getting an error when npm run build, is there something wrong with my fetch function? cause in development it worked fine

7 Replies

@joulev What is process.env.BASE_URL?
Cape lionOP
process.env.BASE_URL is http://localhost:3000
@Cape lion process.env.BASE_URL is http://localhost:3000
then read the link i provided above, section "Why does it require absolute URLs?"
Cape lionOP
so it should look like this? but how do i like do ssr? revalidate the data or cache?
@Cape lion so it should look like this? but how do i like do ssr? revalidate the data or cache?
American black bear
how do you do that screenshot