{"record":{"id":"686ccfcd1a5211ef","repo":"FuelLabs/fuels-ts","slug":"missing-required-parameter","errorCode":"MISSING_REQUIRED_PARAMETER","errorMessage":"At least one parameter should be supplied: 'input' or 'filepaths'.","messagePattern":"At least one parameter should be supplied: 'input' or 'filepaths'\\.","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/abi-typegen/src/runTypegen.ts","lineNumber":48,"sourceCode":"\n  function log(...args: unknown[]) {\n    if (!silent) {\n      // eslint-disable-next-line no-console\n      console.log(args.join(' '));\n    }\n  }\n\n  /*\n    Assembling files array and expanding globals if needed\n  */\n  let filepaths: string[] = [];\n\n  if (!inputFilepaths?.length && inputs?.length) {\n    filepaths = inputs.flatMap((i) => globSync(i, { cwd }));\n  } else if (inputFilepaths?.length) {\n    filepaths = inputFilepaths;\n  } else {\n    throw new FuelError(\n      ErrorCode.MISSING_REQUIRED_PARAMETER,\n      `At least one parameter should be supplied: 'input' or 'filepaths'.`\n    );\n  }\n\n  /*\n    Assembling file paths x contents\n  */\n  const abiFiles = filepaths.map((filepath) => {\n    const contents = readFileSync(filepath, 'utf-8');\n    const abi: IFile = {\n      path: filepath,\n      contents,\n    };\n\n    return abi;\n  });\n","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/abi-typegen/src/runTypegen.ts#L30-L66","documentation":"runTypegen requires at least one of the `input` (glob patterns) or `filepaths` (explicit list) parameters to supply ABI source files. If both are absent/empty the generator has no inputs to process and aborts before doing any filesystem work.","triggerScenarios":"Invoking runTypegen with neither inputs nor inputFilepaths; passing inputs as an empty array and no filepaths; parameter destructuring drops the field due to a typo.","commonSituations":"Programmatic typegen call missing the inputs option; CLI invocation with a misconfigured config file that yields empty inputs; refactoring that renames the option key.","solutions":["Provide at least `input` as a non-empty array of glob patterns, or `filepaths` as explicit ABI paths.","If invoking from a wrapper script, validate options before calling runTypegen."],"exampleFix":"// before\nrunTypegen({ project: 'contracts', output: 'src' });\n\n// after\nrunTypegen({ project: 'contracts', output: 'src', input: ['abis/*-abi.json'] });","handlingStrategy":"validation","validationCode":"function assertTypegenInputs(opts: { input?: string[]; filepaths?: string[] }) {\n  if (!opts.input?.length && !opts.filepaths?.length) {\n    throw new Error(\"Provide 'input' globs or 'filepaths'\");\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a non-empty `input` array of globs to runTypegen.","Validate options in wrapper scripts before delegating to runTypegen."],"tags":["typegen","missing-parameter","config","inputs"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}