-
Operating System: also using appDir: True I'm using next-auth package to protect routes, but upon deployment to Vercel am getting the error: Build Completed in /vercel/output [40s] I don't believe crypto is required within the middleware middlewear.ts
Any help is appreciated, I can provide further info just not sure what would be causing this. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 34 replies
-
Hi, Do you still see if your downgrade next-auth/middleware? Typically this error happens only at midddleware level, so your auth file shouldn't really matter, but you never know... Kind of weird that it doesn't log where crypto is used, or perhaps you could include that? Also make sure to remove Just tried this in a couple of projects, and no issues were present. I haven't implemented the |
Beta Was this translation helpful? Give feedback.
-
I just got a similar error:
I don't even have these keywords in my code |
Beta Was this translation helpful? Give feedback.
-
I had the same issue. I deleted my project and redeployed without changing anything... it worked. Anything to do with the build cache? |
Beta Was this translation helpful? Give feedback.
-
I got the same issue and found a way to fix it. In the Project Settings > Build & Development Settings, I changed the Framework Presets from Hope it help! |
Beta Was this translation helpful? Give feedback.
-
Unable to deploy on vercel. Last major changes that I did was added "lucid-react" icons. No error while building it in my local machine, while on vercel it shows this:
|
Beta Was this translation helpful? Give feedback.
-
Good news everyone, Node.js Middleware support landed in Next.js 15.2 (experimental). This is now ready for testing. For any issues you run into, please open new issues so we can track and address before marking it as stable. Thank you! https://nextjs.org/blog/next-15-2#nodejs-middleware-experimental |
Beta Was this translation helpful? Give feedback.
I got the same issue and found a way to fix it.
In the Project Settings > Build & Development Settings, I changed the Framework Presets from
Others
toNext.js
and it worked perfectly.Hope it help!