Middleware doesn't load the `server.mjs` variables
I have the followinng middleware in
src/middleware.ts
But i get the zod error because the serverSchema
fails the parse.
4 Replies
Run
cp .env.example .env
Or set the above environment variables manuallyi just tested this and it worked:
it's possible that typesafe env vars were broken in middleware in an old ct3a version
if that's the case, maybe copy the new env var setup into your existing app
Oh wait I think your right
I had that a month back I think.
i will try that,
i create this project 2 weeks ago idk how much it changed
thanks @cje it was the old env version for the project
I had the env folder with the schema server and client
I removed it and coopy the new env.mjs into the /src folder and it work perfectly