Skip to content

demoUrl missing environment variables #93

@Railly

Description

@Railly

When creating a project with environment variables, the demoUrl returned by v0.chats.create() doesn't have access to those env vars.

Repro:

  const project = await v0.projects.create({
    name: 'Test',
    environmentVariables: [
      { key: 'NEXT_PUBLIC_API_KEY', value: 'test_123' }
    ]
  })

  const chat = await v0.chats.create({
    projectId: project.id,
    message: 'console.log process.env values'
  })

  // Browser console on demoUrl shows:
  // NEXT_PUBLIC_API_KEY: undefined

Verified:

  • Env vars ARE stored: v0.projects.findEnvVars()returns them
  • Env vars work in v0.dev editor
  • Env vars are undefined in demoUrl
  • Tested with v0-clone tepmlate, same issue

Impact:
Breaks apps that need env vars to run. Example: Clerk auth shows blank screen because NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions