Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextjs 15 standalone mode support #290

Open
riccardolardi opened this issue Dec 3, 2024 · 5 comments
Open

Nextjs 15 standalone mode support #290

riccardolardi opened this issue Dec 3, 2024 · 5 comments

Comments

@riccardolardi
Copy link

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
Copy link

WeslleyNasRocha commented Dec 3, 2024

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
Copy link
Author

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

@riccardolardi
Copy link
Author

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
Copy link
Author

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

@ezeparziale
Copy link

You need to add the following to your next.config.ts:

transpilePackages: ["@t3-oss/env-nextjs", "@t3-oss/env-core"],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants