next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

ERROR: Request is not defined when using Gatsby NextAuth.js

Open edardev opened this issue 3 years ago • 1 comments

Environment

System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz Memory: 4.17 GB / 15.88 GB Binaries: Node: 16.15.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.52) Internet Explorer: 11.0.19041.1566 npmPackages: next-auth: ^4.14.0 => 4.14.0 react: ^18.1.0 => 18.2.0

Reproduction URL

https://github.com/nextauthjs/next-auth/tree/main/apps/example-gatsby

Describe the issue

Error when executing function "~/next-auth-gatsby-example/src/api/[...nextauth].js":

Executed function "/api/[...nextauth]" in 82ms

ERROR

Request is not defined

How to reproduce

For some reasons this project does not work with gatsby on gatsby functions and/or netlify functions.

Expected behavior

This example project should work but does not

edardev avatar Oct 24 '22 15:10 edardev

Will Gatsby still be supported in the near future? @balazsorban44

targetlucked69 avatar Jul 23 '24 19:07 targetlucked69