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

Won't serve #764

Closed
Tytan-Codes-Alt opened this issue Mar 4, 2024 · 3 comments
Closed

Won't serve #764

Tytan-Codes-Alt opened this issue Mar 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Tytan-Codes-Alt
Copy link

Description:

Steps to Reproduce:

  1. pnpm innstall
    2.pnpm build:packages
    3.pnpm dev

Expected Behavior:

be able to see the website

Actual Behavior:

Screenshots/Logs:

tytan@Tytans-MacBook-Air ~/D/C/honghong.me (main)> pnpm dev

> honghong-me-monorepo@ dev /Users/tytan/Desktop/Code/honghong.me
> turbo dev

• Packages in scope: @tszhong0411/emails, @tszhong0411/eslint-config, @tszhong0411/mdx, @tszhong0411/prettier-config, @tszhong0411/tailwind-config, @tszhong0411/tsconfig, @tszhong0411/ui, @tszhong0411/utils, blog
• Running dev in 9 packages
• Remote caching disabled
@tszhong0411/utils:dev: cache bypass, force executing 3bc49cb38ea189ed
@tszhong0411/ui:dev: cache bypass, force executing 9ad3ffc8b32bde2d
blog:dev: cache bypass, force executing a0f40bd8bc0ebf7c
@tszhong0411/emails:dev: cache bypass, force executing d93adfc176d90fc9
blog:dev:
blog:dev: > blog@0.0.0 dev /Users/tytan/Desktop/Code/honghong.me/apps/web
blog:dev: > concurrently "tsx ./src/lib/auto-refresh.ts" "next dev --turbo"
blog:dev:
@tszhong0411/emails:dev:
@tszhong0411/emails:dev: > @tszhong0411/emails@0.0.0 dev /Users/tytan/Desktop/Code/honghong.me/packages/emails
@tszhong0411/emails:dev: > email dev --port 3001 --dir src
@tszhong0411/emails:dev:
@tszhong0411/ui:dev:
@tszhong0411/ui:dev: > @tszhong0411/ui@0.0.7 dev /Users/tytan/Desktop/Code/honghong.me/packages/ui
@tszhong0411/ui:dev: > tsup --watch
@tszhong0411/ui:dev:
@tszhong0411/utils:dev:
@tszhong0411/utils:dev: > @tszhong0411/utils@0.0.6 dev /Users/tytan/Desktop/Code/honghong.me/packages/utils
@tszhong0411/utils:dev: > tsup --watch
@tszhong0411/utils:dev:
@tszhong0411/emails:dev:     React Email 2.1.0
@tszhong0411/emails:dev:     Running preview at:          http://localhost:3001
@tszhong0411/emails:dev:
@tszhong0411/emails:dev:   ⠋ Getting react-email preview server ready...
@tszhong0411/utils:dev: CLI Building entry: src/index.ts
@tszhong0411/utils:dev: CLI Using tsconfig: tsconfig.json
@tszhong0411/utils:dev: CLI tsup v8.0.2
@tszhong0411/utils:dev: CLI Using tsup config: /Users/tytan/Desktop/Code/honghong.me/packages/utils/tsup.config.ts
@tszhong0411/utils:dev: CLI Running in watch mode
@tszhong0411/ui:dev: CLI Building entry: src/index.ts
@tszhong0411/utils:dev: CLI Target: esnext
@tszhong0411/ui:dev: CLI Using tsconfig: tsconfig.json
@tszhong0411/ui:dev: CLI tsup v8.0.2
@tszhong0411/ui:dev: CLI Using tsup config: /Users/tytan/Desktop/Code/honghong.me/packages/ui/tsup.config.ts
@tszhong0411/ui:dev: CLI Running in watch mode
@tszhong0411/ui:dev: CLI Target: esnext
@tszhong0411/ui:dev: ESM Build start
@tszhong0411/utils:dev: ESM Build start
@tszhong0411/ui:dev: ESM dist/index.mjs 51.41 KB
@tszhong0411/ui:dev: ESM ⚡️ Build success in 74ms
@tszhong0411/utils:dev: ESM dist/index.mjs 162.00 B
@tszhong0411/utils:dev: ESM ⚡️ Build success in 67ms
@tszhong0411/utils:dev: CLI Watching for changes in "."
@tszhong0411/utils:dev: CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
@tszhong0411/ui:dev: CLI Watching for changes in "."
@tszhong0411/ui:dev: CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
  ⠹ Getting react-email preview server ready...
blog:dev: [1] file:///Users/tytan/Desktop/Code/honghong.me/apps/web/next.config.mjs:14
blog:dev: [1] jiti(filename)(envPath)
blog:dev: [1]               ^
blog:dev: [1]
blog:dev: [1] Error: ParseError: Unexpected token, expected ","
blog:dev: [1]  /Users/tytan/Desktop/Code/honghong.me/apps/web/src/env.ts:7:2
blog:dev: [1]     at file:///Users/tytan/Desktop/Code/honghong.me/apps/web/next.config.mjs:14:15
blog:dev: [1]     at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
blog:dev: [1]     at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
blog:dev: [1]     at async importModuleDynamicallyWrapper (node:internal/vm/module:430:15)
blog:dev: [1]     at async loadConfig (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/config.js:703:36)
blog:dev: [1]     at async nextDev (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/cli/next-dev.js:197:14)
blog:dev: [1]     at async main (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/bin/next:155:5)
blog:dev: [1]
blog:dev: [1] Node.js v21.6.1
@tszhong0411/utils:dev: DTS Build start
blog:dev: [1] next dev --turbo exited with code 1
  ⠼ Getting react-email preview server ready...
  ✔ Ready in 8.0s
@tszhong0411/emails:dev:
@tszhong0411/ui:dev: DTS ⚡️ Build success in 9343ms
^C    ...Finishing writing to cache...                                                                                                                                                                     @tszhong0411/emails:dev:
@tszhong0411/emails:dev: shutting down dev server
@tszhong0411/emails:dev:
blog:dev: [0] tsx ./src/lib/auto-refresh.ts exited with code 130
blog:dev:  ELIFECYCLE  Command failed with exit code 1.

Environment:

Macos Sonoma

  • Operating System:
  • Browser (if applicable):

Additional Information:

@Tytan-Codes-Alt Tytan-Codes-Alt added the bug Something isn't working label Mar 4, 2024
@tszhong0411
Copy link
Owner

@Tytan-Codes-Alt
It seems that you're missing the , after skipValidation: true in env.ts. Please modify it and try again.

@Tytan-Codes-Alt
Copy link
Author

@tszhong0411 Thanks for the response, I fixed the issue but, i now have a new issue.

tytan@Tytans-MacBook-Air honghong.me % pnpm dev

> honghong-me-monorepo@ dev /Users/tytan/Desktop/Code/honghong.me
> turbo dev

╭───────────────────────────────────────────────────────────────────────╮
│                                                                       │
│                  Update available v1.12.4 ≫ v1.13.0                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v1.13.0    │
│           Run "npx @turbo/codemod@latest update" to update            │
│                                                                       │
│        Follow @turborepo for updates: https://x.com/turborepo         │
╰───────────────────────────────────────────────────────────────────────╯
• Packages in scope: @tszhong0411/emails, @tszhong0411/eslint-config, @tszhong0411/mdx, @tszhong0411/prettier-config, @tszhong0411/tailwind-config, @tszhong0411/tsconfig, @tszhong0411/ui, @tszhong0411/utils, blog
• Running dev in 9 packages
• Remote caching disabled
blog:dev: cache bypass, force executing b2769ceb53f81395
@tszhong0411/ui:dev: cache bypass, force executing 6ac8c3daf003b75a
@tszhong0411/utils:dev: cache bypass, force executing 7e2c67b33a6be208
@tszhong0411/emails:dev: cache bypass, force executing 3b53fdf74076be55
@tszhong0411/emails:dev:
@tszhong0411/emails:dev: > @tszhong0411/emails@0.0.0 dev /Users/tytan/Desktop/Code/honghong.me/packages/emails
@tszhong0411/emails:dev: > email dev --port 3001 --dir src
@tszhong0411/emails:dev:
@tszhong0411/utils:dev:
@tszhong0411/utils:dev: > @tszhong0411/utils@0.0.7 dev /Users/tytan/Desktop/Code/honghong.me/packages/utils
@tszhong0411/utils:dev: > tsup --watch
@tszhong0411/utils:dev:
@tszhong0411/ui:dev:
@tszhong0411/ui:dev: > @tszhong0411/ui@0.0.10 dev /Users/tytan/Desktop/Code/honghong.me/packages/ui
@tszhong0411/ui:dev: > tsup --watch
@tszhong0411/ui:dev:
blog:dev:
blog:dev: > blog@0.0.0 dev /Users/tytan/Desktop/Code/honghong.me/apps/web
blog:dev: > concurrently "tsx ./src/lib/auto-refresh.ts" "next dev --turbo"
blog:dev:
@tszhong0411/emails:dev:     React Email 2.1.0
@tszhong0411/emails:dev:     Running preview at:          http://localhost:3001
@tszhong0411/emails:dev:
@tszhong0411/emails:dev:   ⠋ Getting react-email preview server ready...
@tszhong0411/utils:dev: CLI Building entry: src/index.ts
@tszhong0411/utils:dev: CLI Using tsconfig: tsconfig.json
@tszhong0411/utils:dev: CLI tsup v8.0.2
@tszhong0411/utils:dev: CLI Using tsup config: /Users/tytan/Desktop/Code/honghong.me/packages/utils/tsup.config.ts
@tszhong0411/utils:dev: CLI Running in watch mode
@tszhong0411/utils:dev: CLI Target: esnext
@tszhong0411/utils:dev: ESM Build start
@tszhong0411/utils:dev: ESM dist/index.mjs 162.00 B
@tszhong0411/utils:dev: ESM ⚡️ Build success in 48ms
@tszhong0411/utils:dev: CLI Watching for changes in "."
@tszhong0411/utils:dev: CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
@tszhong0411/ui:dev: CLI Building entry: src/index.ts
@tszhong0411/ui:dev: CLI Using tsconfig: tsconfig.json
@tszhong0411/ui:dev: CLI tsup v8.0.2
@tszhong0411/ui:dev: CLI Using tsup config: /Users/tytan/Desktop/Code/honghong.me/packages/ui/tsup.config.ts
@tszhong0411/ui:dev: CLI Running in watch mode
@tszhong0411/ui:dev: CLI Target: esnext
@tszhong0411/ui:dev: ESM Build start
@tszhong0411/ui:dev: ESM dist/index.mjs 51.45 KB
@tszhong0411/ui:dev: ESM ⚡️ Build success in 193ms
@tszhong0411/ui:dev: CLI Watching for changes in "."
@tszhong0411/ui:dev: CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
  ⠙ Getting react-email preview server ready...
@tszhong0411/utils:dev: DTS Build start
@tszhong0411/ui:dev: DTS Build start
blog:dev: [1] ❌ Invalid environment variables: {
blog:dev: [1]   SPOTIFY_CLIENT_ID: [ 'Required' ],
blog:dev: [1]   SPOTIFY_CLIENT_SECRET: [ 'Required' ],
blog:dev: [1]   SPOTIFY_REFRESH_TOKEN: [ 'Required' ],
blog:dev: [1]   NEXTAUTH_SECRET: [ 'Required' ],
blog:dev: [1]   GOOGLE_API_KEY: [ 'Required' ],
blog:dev: [1]   GOOGLE_CLIENT_ID: [ 'Required' ],
blog:dev: [1]   GOOGLE_CLIENT_SECRET: [ 'Required' ],
blog:dev: [1]   OAUTH_CLIENT_KEY: [ 'Required' ],
blog:dev: [1]   OAUTH_CLIENT_SECRET: [ 'Required' ],
blog:dev: [1]   GITHUB_TOKEN: [ 'Required' ],
blog:dev: [1]   DATABASE_URL: [ 'Invalid url' ],
blog:dev: [1]   IP_ADDRESS_SALT: [ 'Required' ],
blog:dev: [1]   WAKATIME_API_KEY: [ 'Required' ],
blog:dev: [1]   DISCORD_WEBHOOK_URL: [ 'Required' ],
blog:dev: [1]   RESEND_API_KEY: [ 'Required' ],
blog:dev: [1]   AUTHOR_EMAIL: [ 'Required' ],
blog:dev: [1]   NEXT_PUBLIC_UMAMI_URL: [ 'Required' ],
blog:dev: [1]   NEXT_PUBLIC_UMAMI_WEBSITE_ID: [ 'Required' ]
blog:dev: [1] }
blog:dev: [1] /Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/@t3-oss+env-core@0.9.2_typescript@5.3.3_zod@3.22.4/node_modules/@t3-oss/env-core/dist/index.js:29
blog:dev: [1]     throw new Error("Invalid environment variables");
blog:dev: [1]           ^
blog:dev: [1]
blog:dev: [1] Error: Invalid environment variables
blog:dev: [1]     at onValidationError (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/@t3-oss+env-core@0.9.2_typescript@5.3.3_zod@3.22.4/node_modules/@t3-oss/env-core/dist/index.js:29:11)
blog:dev: [1]     at createEnv (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/@t3-oss+env-core@0.9.2_typescript@5.3.3_zod@3.22.4/node_modules/@t3-oss/env-core/dist/index.js:35:12)
blog:dev: [1]     at createEnv (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/@t3-oss+env-nextjs@0.9.2_typescript@5.3.3_zod@3.22.4/node_modules/@t3-oss/env-nextjs/dist/index.js:12:33)
blog:dev: [1]     at /Users/tytan/Desktop/Code/honghong.me/apps/web/src/env.ts:4:52
blog:dev: [1]     at evalModule (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:256443)
blog:dev: [1]     at jiti (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:254371)
blog:dev: [1]     at file:///Users/tytan/Desktop/Code/honghong.me/apps/web/next.config.mjs:14:15
blog:dev: [1]     at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
blog:dev: [1]     at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
blog:dev: [1]     at async importModuleDynamicallyWrapper (node:internal/vm/module:430:15)
blog:dev: [1]     at async loadConfig (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/config.js:703:36)
blog:dev: [1]     at async nextDev (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/cli/next-dev.js:197:14)
blog:dev: [1]     at async main (/Users/tytan/Desktop/Code/honghong.me/node_modules/.pnpm/next@14.1.1-canary.41_@babel+core@7.23.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/bin/next:155:5)
blog:dev: [1]
blog:dev: [1] Node.js v21.6.1
  ⠏ Getting react-email preview server ready...
  ✔ Ready in 14.2s
@tszhong0411/emails:dev:
@tszhong0411/ui:dev: DTS ⚡️ Build success in 22275ms

@tszhong0411
Copy link
Owner

@Tytan-Codes-Alt Please refer to the instruction and try again:

Create a .env.local file based on the provided .env.example file and fill in the necessary variables.

OR you can skip this by modifying apps/web/src/env.ts:

export const env = createEnv({
  skipValidation: true,

  server: {
    // ...
  }
})

It will skip the validation of environment variables. And you may notice that some functionalities will not work properly. But it's okay for learning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants