T3 env lint error on Github CI
Run npm run lint
Invalid environment variables: {
PUSHER_APP_ID: [ 'Required' ],
PUSHER_SECRET: [ 'Required' ],
CONTENTFUL_SPACE_ID: [ 'Required' ],
CONTENTFUL_ACCESS_TOKEN: [ 'Required' ],
NEXT_PUBLIC_PUSHER_KEY: [ 'Required' ]
}
error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
file:///home/runner/work/chirp/chirp/src/env.mjs:68
throw new Error("Invalid environment variables")
^
Error: Invalid environment variables
at file:///home/runner/work/chirp/chirp/src/env.mjs:68:11
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.16.0
Error: Process completed with exit code 1.
Problem is when I run lint locally I get no errors. This error only shows up on github CI. App deploys on Vercel just fine, it's only the Github CI.
And here is my env.mjs also:
chirp@0.1.0 lint
next lint
PUSHER_APP_ID: [ 'Required' ],
PUSHER_SECRET: [ 'Required' ],
CONTENTFUL_SPACE_ID: [ 'Required' ],
CONTENTFUL_ACCESS_TOKEN: [ 'Required' ],
NEXT_PUBLIC_PUSHER_KEY: [ 'Required' ]
}
error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
file:///home/runner/work/chirp/chirp/src/env.mjs:68
throw new Error("Invalid environment variables")
^
Error: Invalid environment variables
at file:///home/runner/work/chirp/chirp/src/env.mjs:68:11
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.16.0
Error: Process completed with exit code 1.
Problem is when I run lint locally I get no errors. This error only shows up on github CI. App deploys on Vercel just fine, it's only the Github CI.
And here is my env.mjs also: