Restarted static page generation for / because it took more than 60 seconds
Unanswered
American black bear posted this in #help-forum
American black bearOP
I have this issue when I run
If I remove all async calls from my page.tsx, it works fine... What am I doing wrong?
npm run build
.If I remove all async calls from my page.tsx, it works fine... What am I doing wrong?
✓ Collecting page data
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.
⚠ Restarted static page generation for / because it took more than 60 seconds
⚠ See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.
⚠ Restarted static page generation for / because it took more than 60 seconds
Generating static pages (21/22) [= ]
34 Replies
@American black bear I have this issue when I run `npm run build`.
If I remove all async calls from my page.tsx, it works fine... What am I doing wrong?
✓ Collecting page data
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.
⚠ Restarted static page generation for / because it took more than 60 seconds
⚠ See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.
⚠ Restarted static page generation for / because it took more than 60 seconds
Generating static pages (21/22) [= ]
delete the .next folder and start it again. If it still doesnt work, make sure to provide some code so we can have a look into it. Maybe even providing a repro (github or codesandbox)
@B33fb0n3 delete the .next folder and start it again. If it still doesnt work, make sure to provide some code so we can have a look into it. Maybe even providing a repro (github or codesandbox)
American black bearOP
it’s just the homepage. I have a few requests inside of it and when I remove all requests it works
and I already deleted the .next folder
I also deleted the node_modules
@American black bear and I already deleted the .next folder
what's the result? Does it work?
If it still doesnt work, make sure to provide some code so we can have a look into it. Maybe even providing a repro (github or codesandbox)
@B33fb0n3 what's the result? Does it work?
American black bearOP
no
American Crocodile
Dumb questions, have you tried to increase to timeout to a long time to see if it works? staticPageGenerationTimeout
there are two comments with the paths
If I remove the fetchWinners function it works fine
@American Crocodile Dumb questions, have you tried to increase to timeout to a long time to see if it works? staticPageGenerationTimeout
American black bearOP
yup, I added 10 minutes... xD
@American black bear https://pastebin.com/t31mmV1u
is your
src/app/(home)/components/_Header/Header.tsx
a client component as you access as context provider useTranslation(lang, 'navbar')
?@B33fb0n3 is your src/app/(home)/components/_Header/Header.tsx a client component as you access as context provider useTranslation(lang, 'navbar')?
American black bearOP
server component
I am using useTranslation also for server components
like I said, everything works if I remove the fetchWinners function
do you get the correct translations? 🤔
@B33fb0n3 do you get the correct translations? 🤔
American black bearOP
yup
there's the use prefix but it's not really a hook
ah ok... can you add some loggings to the
TL;DR
So log:
1. if it will be called
2. when you get a result
3. what's the result
4. The execution time of the fetch
getWinners
to see if it will be called, to see when you get the result and what's the result and also make sure to stop the time between the callings. TL;DR
So log:
1. if it will be called
2. when you get a result
3. what's the result
4. The execution time of the fetch
@B33fb0n3 ah ok... can you add some loggings to the getWinners to see if it will be called, to see **when** you get the result and what's the result and also make sure to stop the time between the callings.
TL;DR
So log:
1. if it will be called
2. when you get a result
3. what's the result
4. The execution time of the fetch
American black bearOP
It started working...
I deleted and added it line by line until it worked
on the last line the git changes went from 1 to 0 and the build went through
I didn't understand anything but we can't question everything xD
@American black bear I didn't understand anything but we can't question everything xD
haha ok, can you clarify?
@B33fb0n3 haha ok, can you clarify?
American black bearOP
I deleted the home folder and added the old one back. the build passed
then I started adding my code line by line until everything was the same
and suddendly it worked 🙂
which does not make any sense because I published the code and a friend tried on their side and the error was the same
I am quite confused. Is your error now solved or do you still need a solution?
@B33fb0n3 I am quite confused. Is your error now solved or do you still need a solution?
American black bearOP
😂
it's good now
haha alright 🤣