"hostname" and "port" must be provided when starting next to use "unstable_revalidate"
See original GitHub issueIssue 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:
"hostname" and "port" must be provided when starting next to use "unstable_revalidate". See more here https://nextjs.org/docs/advanced-features/custom-server
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
- OS/Environment: macOS 12.2.1
- @sls-next/serverless-component version: v3.7.0-alpha.11
- Next.js version: 12.1
Checklist
- You have reviewed the README and FAQs, which answers several common questions.
- You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible. As there is only one maintainer (who maintains this in his free time) and thus very limited resources, if you have time, please try to debug the issue a bit yourself if possible.
- You have first tried using the most recent
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
r/nextjs - Next.js 12.1: On-demand ISR, support for styled- ...
Now I can use unstable_revalidate ! Hopefully that saves Vercel a bunch of CPU cycles ;).
Read more >Next.js CLI
The Next.js CLI allows you to start, build, and export your application. To get a list of the available CLI commands, run the...
Read more >nxのNext.jsでもOn-demand Incremental Static ...
nxのNext.jsでもOn-demand Incremental Static Regenerationしたい ... Error: "hostname" and "port" must be provided when starting next to use ...
Read more >node.js - 503 Service Unavailable. The server is ...
Finally, I solved my problem by changing the node version of web application in cpanel. In fact, the problem was that I was...
Read more >A Complete Guide To Incremental Static Regeneration ...
With Next.js, you can continue using your existing code and add as much (or as little) React as you need. By starting small...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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”