You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In production mode. When running a next.js app with a custom hostname (--hostname=localhost or set the option in project.json) then the process will eventually error after roughly 120s.
Current Behavior
In production mode. When running a next.js app with a custom hostname (
--hostname=localhost
or set the option inproject.json
) then the process will eventually error after roughly 120s.This is because the nx executor
next:server
is waiting for the server response on port3000
and always127.0.0.1
.https://github.com/nrwl/nx/blob/master/packages/next/src/executors/server/server.impl.ts#L85 because we are not forwarding the custom hostname. Next.js will not respond on
localhost
by default: vercel/next.js#51378 and so we will retry 120 times before exiting with an unhandled exception error.This simple change would fix it:
Expected Behavior
I should be able to start my next application with the
next:server
executor on a custom hostnameGitHub Repo
No response
Steps to Reproduce
nx serve --prod --hostname=localhost
Nx Report
Failure Logs
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: