[GET] /auth/signin?callbackUrl=http://localhost:3000 17:22:23:77 2021-10-24T12:22:24.062Z a07d6ace-3b47-4472-a45b-f7ef9989a9b5 ERROR [next-auth][error][CLIENT_FETCH_ERROR] https://next-auth.js.org/errors#client_fetch_error request to http://localhost:3000/api/auth/providers failed, reason: connect ECONNREFUSED 127.0.0.1:3000 { error: { message: 'request to http://localhost:3000/api/auth/providers failed, reason: connect ECONNREFUSED 127.0.0.1:3000', stack: 'FetchError: request to http://localhost:3000/api/auth/providers failed, reason: connect ECONNREFUSED 127.0.0.1:3000\n' + ' at ClientRequest.<anonymous> (/var/task/node_modules/node-fetch/lib/index.js:1461:11)\n' + ' at ClientRequest.emit (events.js:400:28)\n' + ' at Socket.socketErrorListener (_http_client.js:475:9)\n' + ' at Socket.emit (events.js:400:28)\n' + ' at emitErrorNT (internal/streams/destroy.js:106:8)\n' + ' at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n' + ' at processTicksAndRejections (internal/process/task_queues.js:82:21)', name: 'FetchError' }, path: 'providers', message: 'request to http://localhost:3000/api/auth/providers failed, reason: connect ECONNREFUSED 127.0.0.1:3000' } 2021-10-24T12:22:24.099Z a07d6ace-3b47-4472-a45b-f7ef9989a9b5 ERROR TypeError: Cannot convert undefined or null to object at Function.values (<anonymous>) at SignIn (/var/task/.next/server/pages/auth/signin.js:75:26) at d (/var/task/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498) at bb (/var/task/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16) at abrender (/var/task/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43) at abread (/var/task/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83) at Object.exports.renderToString (/var/task/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138) at Object.renderPage (/var/task/node_modules/next/dist/server/render.js:596:45) at Function.getInitialProps (/var/task/.next/server/pages/_document.js:601:19) at Object.loadGetInitialProps (/var/task/node_modules/next/dist/shared/lib/utils.js:69:29) { page: '/auth/signin' } RequestId: a07d6ace-3b47-4472-a45b-f7ef9989a9b5 Error: Runtime exited with error: exit status 1 Runtime.ExitErrorEstoy usando vercel para hospedaje y después de una semana de codificación y finalmente cargando la compilación cuando intento iniciar sesión me da este error. No entiendo esto y realmente agradecería si alguno de ustedes pudiera ayudarme. Esta es la URL https: //insta-2-0-ebon.vercel.app/ de la aplicación
Si usa next.js, intente agregar NEXT_PUBLIC_VERCEL_URL . https://vercel.com/docs/concepts/projects/environment-variables#
Tuve el mismo problema, y no se trata solo de que se agregue NEXTAUTH_URL si está usando un adaptador, para mí fue MongoDB, no olvide agregar la variable MONGODB_URI , pero también pasé mucho tiempo y el mensaje de error fue engañoso, pero finalmente, después de agregar el URI de conexión de mongo, funciona
Si está utilizando el archivo .env (process.env), verifique que su variable debe tener el prefijo NEXT_PUBLIC_ si no, verifique el back-end de su URL, actualmente está usando localhost