evanw/esbuild · error · Error

Missing property "in" for entry point at index ${i}

Error message

Missing property "in" for entry point at index ${i}

What it means

Error "Missing property "in" for entry point at index ${i}" thrown in evanw/esbuild.

Source

Thrown at lib/shared/common.ts:353

    }
  }
  if (outExtension) {
    for (let ext in outExtension) {
      if (ext.indexOf('=') >= 0) throw new Error(`Invalid out extension: ${ext}`)
      flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], 'out extension', ext)}`)
    }
  }

  if (entryPoints) {
    if (Array.isArray(entryPoints)) {
      for (let i = 0, n = entryPoints.length; i < n; i++) {
        let entryPoint = entryPoints[i]
        if (typeof entryPoint === 'object' && entryPoint !== null) {
          let entryPointKeys: OptionKeys = Object.create(null)
          let input = getFlag(entryPoint, entryPointKeys, 'in', mustBeString)
          let output = getFlag(entryPoint, entryPointKeys, 'out', mustBeString)
          checkForInvalidFlags(entryPoint, entryPointKeys, 'in entry point at index ' + i)
          if (input === undefined) throw new Error('Missing property "in" for entry point at index ' + i)
          if (output === undefined) throw new Error('Missing property "out" for entry point at index ' + i)
          entries.push([output, input])
        } else {
          entries.push(['', validateStringValue(entryPoint, 'entry point at index ' + i)])
        }
      }
    } else {
      for (let key in entryPoints) {
        entries.push([key, validateStringValue(entryPoints[key], 'entry point', key)])
      }
    }
  }

  if (stdin) {
    let stdinKeys: OptionKeys = Object.create(null)
    let contents = getFlag(stdin, stdinKeys, 'contents', mustBeStringOrUint8Array)
    let resolveDir = getFlag(stdin, stdinKeys, 'resolveDir', mustBeString)
    let sourcefile = getFlag(stdin, stdinKeys, 'sourcefile', mustBeString)

View on GitHub (pinned to 6ff1d8b0d8)

Solutions

  1. Provide the "in" property for every entry point object in the entryPoints array
  2. Ensure each entry point is either a string or an object with "in" (and optionally "out")

Example fix

esbuild.buildSync({ entryPoints: [{ in: 'src/app.ts', out: 'app' }] });

When it happens

Trigger: Thrown at lib/shared/common.ts:353 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of evanw/esbuild@6ff1d8b0d8 (2026-08-03). Data as JSON: /data/errors/822d757f6517c733.json. Report an issue: GitHub.