Issue with server.msj
I've updated the .env to something like this:
I've also updated the schema as it's written in the docs.
but now this error is appearing for no reason
as you can see I'm also console logging the key but that shouldnt be a reason for the error.
anyone seen some similar behavior and knows how to fix it?
4 Replies
Remove the
NEXT_PUBLIC_
prefix
It should be like
yh you dont want your aws keys public lol
This prefix should only be used when it is safe to be exposed to the client-side, and anything specifically for the server should NOT be exposed to the client.
thanks for the help the issue ended up being that i was importing the server env instead of the client one