langgenius/dify · error · Error

Missing value for ${name}.

Error message

Missing value for ${name}.

What it means

Error "Missing value for ${name}." thrown in langgenius/dify.

Source

Thrown at packages/dev-proxy/src/config.ts:29

const DEFAULT_CONFIG_FILE = 'dev-proxy.config.ts'
const DEFAULT_PROXY_HOST = '127.0.0.1'
const DEFAULT_PROXY_PORT = 5001

const OPTION_NAME_TO_KEY = {
  '--config': 'config',
  '-c': 'config',
  '--env-file': 'envFile',
  '--host': 'host',
  '--port': 'port',
} as const

type OptionName = keyof typeof OPTION_NAME_TO_KEY

const isOptionName = (value: string): value is OptionName => value in OPTION_NAME_TO_KEY

const requireOptionValue = (name: string, value?: string) => {
  if (!value || value.startsWith('-')) throw new Error(`Missing value for ${name}.`)

  return value
}

export const parseDevProxyCliArgs = (argv: readonly string[]): DevProxyCliOptions => {
  const options: DevProxyCliOptions = {}

  for (let index = 0; index < argv.length; index += 1) {
    const arg = argv[index]!

    if (arg === '--') continue

    if (arg === '--help' || arg === '-h') {
      options.help = true
      continue
    }

    if (arg === '--watch') {

View on GitHub (pinned to ef8544b173)

When it happens

Trigger: Thrown at packages/dev-proxy/src/config.ts:29 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/2b03263bfb0e4411. Report an issue: GitHub.