t3-oss / t3-env

https://env.t3.gg
MIT License
2.82k stars 88 forks source link

Nextjs 15 standalone mode support #290

Open riccardolardi opened 1 day ago

riccardolardi commented 1 day ago

Hi all. I'm trying to deploy a T3 standalone build on a VPS. Upon starting node server.ts I get a bunch of Invalid environment variables errors to T3 env being not able to find the variables. Is this a known issue? Is T3 not compatible with standalone mode?

WeslleyNasRocha commented 1 day ago

I was having this issue, and what fixed for me was add transpilePackages: [ "t3-oss/env-nextjs", "@t3-oss/env-core" ] to my next.config.mjs

riccardolardi commented 1 day ago

Thanks, but this doesn't seem to work for me (same errors)

riccardolardi commented 15 hours ago

Sorry, it did indeed work - I just didn't check your code exactly, there was a typo so what worked for me is transpilePackages: [ "@t3-oss/env-nextjs"]

riccardolardi commented 15 hours ago

Maybe would be a good idea to include this in the docs?