-
-
Notifications
You must be signed in to change notification settings - Fork 460
"hostname" and "port" must be provided when starting next to use "unstable_revalidate" #2402
Comments
AFAIK base ISR feature is working where you add the revalidate prop to getStaticProps. If you are referring to 12.1 release's On-demand Incremental Static Regeneration, it should not be working. |
So this happen to me if I am using a custom server, if you do then make sure you have check https://nextjs.org/docs/advanced-features/custom-server for more info |
@thmohd I am using Serverless Stack (sst) which uses serverless-next.js, maybe I should open an issue to them? Can you confirm that ISG with (I do not create any custom server and it is not clear to me if the custom server is created by sst or by serverless-next.js) |
Hi, Do you know if there is any plan to add this feature? |
Any update?, trying to use On-demand ISR gives me "Invariant: required internal revalidate method not passed to api-utils" |
Issue Summary
I want to use req.unstable_revalidate for ISG. Reading here it seems supported.
Actual behavior
If I call req.unstable_revalidate inside an api I got this error:
I can't get any actual information about this problem at the provided url.
Also, checking the code generated inside
.next/serverless/chunk/
I don't think I can pass hostname and port parameters, because the function accept only one parameter:apiRes.unstable_revalidate = (urlPath)=>unstable_revalidate(urlPath, req, apiContext)
Looking for the round of calls that are made previously, I don't even seem to be able to modify this apiContext.
(Locally works fine)
Versions
Checklist
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.The text was updated successfully, but these errors were encountered: