Skip to content

Commit

Permalink
fix(env): nextjs env error
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jun 11, 2024
1 parent 89daf14 commit a7787f8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/env/src/web/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { createEnv } from '@t3-oss/env-nextjs';
import { z } from 'zod';
import { env as dbEnv } from './db';
import { sharedEnv } from '../shared';

export const env = createEnv({
extends: [sharedEnv, dbEnv],
shared: {
NODE_ENV: z.enum(['development', 'test', 'production']).optional(),
},
extends: [sharedEnv],
server: {
PORT: z.coerce.number().default(3000),

Expand All @@ -31,7 +27,6 @@ export const env = createEnv({
NEXT_PUBLIC_POSTHOG_HOST: z.string().optional(),
},
experimental__runtimeEnv: {
NODE_ENV: process.env.NODE_ENV,
NEXT_PUBLIC_POSTHOG_KEY: process.env['NEXT_PUBLIC_POSTHOG_KEY'],
NEXT_PUBLIC_POSTHOG_HOST: process.env['NEXT_PUBLIC_POSTHOG_HOST'],
},
Expand Down

0 comments on commit a7787f8

Please sign in to comment.