Closed rajat1saxena closed 8 months ago
Following things were not working.
In the Dockerfile, we were not copying some newer files.
Dockerfile
The middleware.ts cannot call node modules like mongoose as the middleware runs on edge. Edge runtimes does not support running node based API like net/fs. Read more See how it was affecting us: https://twitter.com/rajatsx/status/1745854971831353799
edge
net
fs
To solve this, we have fallen back to using [...nextauth].ts files instead of middleware.ts. I have removed that file from project.
[...nextauth].ts
middleware.ts
Following things were not working.
In the
Dockerfile
, we were not copying some newer files.The middleware.ts cannot call node modules like mongoose as the middleware runs on
edge
. Edge runtimes does not support running node based API likenet
/fs
. Read more See how it was affecting us: https://twitter.com/rajatsx/status/1745854971831353799To solve this, we have fallen back to using
[...nextauth].ts
files instead ofmiddleware.ts
. I have removed that file from project.