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
After upgrading to Next 12.2.0, following the upgrade guide and reviewing the next-authdocs I'm seeing the following warning when running my Next app with next-auth middleware installed:
You're using a Node.js API (process.versions at line: 6) which is not supported in the Edge Runtime that Middleware uses.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
It seeems like perhaps some of the internals of next-auth aren't supported in the new Edge Runtime that Next 12.2.0 middleware uses.
How to reproduce
Clone the next-auth boilerplate example
Add a middleware.ts file to the root
Insert this in the middleware.ts file:
export{default}from"next-auth/middleware"
Run the app and visit a restricted route. Check the terminal output.
Expected behavior
No warnings in the console related to next-auth.
The text was updated successfully, but these errors were encountered:
EvHaus
added
the
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
label
Jul 1, 2022
Environment
System:
OS: Linux 5.10 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
Memory: 26.90 GB / 31.32 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 17.8.0 - ~/.nvm/versions/node/v17.8.0/bin/node
Yarn: 3.2.1 - ~/.nvm/versions/node/v17.8.0/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v17.8.0/bin/npm
npmPackages:
next: 12.2.0 => 12.2.0
next-auth: 4.7.0 => 4.7.0
react: 18.2.0 => 18.2.0
Reproduction URL
Will add shortly
Describe the issue
After upgrading to Next 12.2.0, following the upgrade guide and reviewing the
next-auth
docs I'm seeing the following warning when running my Next app withnext-auth
middleware installed:It seeems like perhaps some of the internals of
next-auth
aren't supported in the new Edge Runtime that Next 12.2.0 middleware uses.How to reproduce
next-auth
boilerplate examplemiddleware.ts
file to the rootmiddleware.ts
file:Expected behavior
No warnings in the console related to
next-auth
.The text was updated successfully, but these errors were encountered: