No env variables found with turbo v2.0.4 with t3-app

Everytime it builds it gives these errors:

web:build: $ next build
web:build: :x: Invalid environment variables: {
web:build:   NEXTAUTH_SECRET: [ 'Required' ],
web:build:   NEXTAUTH_URL: [ 'Invalid url' ],
web:build:   AWS_ACCESS_KEY_ID: [ 'Required' ],
web:build:   AWS_SECRET_ACCESS_KEY: [ 'Required' ],
web:build:   AWS_REGION: [ 'Required' ],
web:build:   AWS_ENDPOINT: [ 'Required' ],
web:build:   GOOGLE_CLIENT_ID: [ 'Required' ],
web:build:   GOOGLE_CLIENT_SECRET: [ 'Required' ],
web:build:   DISCORD_CLIENT_ID: [ 'Required' ],
web:build:   DISCORD_CLIENT_SECRET: [ 'Required' ]
web:build: }
web:build:  ⨯ Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
web:build: 


I have tried loose mode but the error remains, i know this issue is cause of turbo cause when i downgrade the package to around 1.11.3 it works again.
Solution
adding it to the start script as well fixed it
Was this page helpful?