the edge runtime does not support Node.js crypto module, only in middleware Edge Runtime
Build fails with: It only happens for . The same import in a route handler is fine. All middleware does is read a session cookie and redirect to /login when it is missing it does not knowingly touch crypto at all. The…