{"record":{"id":"e341ad3ada14198a","repo":"vuejs/vue-cli","slug":"make-sure-you-define-a-value-for-the-option-opti","errorCode":null,"errorMessage":"Make sure you define a value for the option ${options.set}","messagePattern":"Make sure you define a value for the option (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@vue/cli/lib/config.js","lineNumber":50,"sourceCode":"\n  if (options.delete) {\n    unset(config, options.delete)\n    await fs.writeFile(file, JSON.stringify(config, null, 2), 'utf-8')\n    if (options.json) {\n      console.log(JSON.stringify({\n        deleted: options.delete\n      }))\n    } else {\n      console.log(`You have removed the option: ${options.delete}`)\n    }\n  }\n\n  if (options.edit) {\n    launch(file)\n  }\n\n  if (options.set && !value) {\n    throw new Error(`Make sure you define a value for the option ${options.set}`)\n  }\n\n  if (options.set && value) {\n    set(config, options.set, value)\n\n    if (value.match('[0-9]')) {\n      set(config, options.set, parseInt(value))\n    }\n\n    if (value === 'true') {\n      set(config, options.set, true)\n    }\n\n    if (value === 'false') {\n      set(config, options.set, false)\n    }\n\n    await fs.writeFile(file, JSON.stringify(config, null, 2), 'utf-8')","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/vuejs/vue-cli/blob/7eb93c169c7520935252e2473387f923ef80d856/packages/@vue/cli/lib/config.js#L32-L68","documentation":"Thrown by the `vue config --set` command when the --set flag is provided but no value argument is supplied on the command line. The config command requires both a key (via --set) and a value; omitting the value is treated as an error since writing an undefined value to the config file is not meaningful.","triggerScenarios":"Running `vue config --set someKey` without providing a value argument after it.","commonSituations":"User forgets the value argument, or a script/macro incorrectly constructs the command. Misunderstanding the CLI syntax where --set expects two operands.","solutions":["Provide a value after the --set key: vue config --set someKey someValue.","If you meant to inspect rather than set, use `vue config --get someKey` instead.","To remove a key, use `vue config --delete someKey`."],"exampleFix":"# before\n$ vue config --set presets\nError: Make sure you define a value for the option presets\n# after\n$ vue config --set presets eslint","handlingStrategy":"validation","validationCode":"// Before calling the config command programmatically:\nif (options.set && (value === undefined || value === null || value === '')) {\n  console.error(`A value must be provided for --set ${options.set}`);\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always provide a value argument after --set <key>.","If scripting vue config commands, validate that both key and value are present.","Use `vue config --help` to review expected syntax."],"tags":["config","cli","validation","command-line"],"backgroundTag":null,"analyzedSha":"7eb93c169c7520935252e2473387f923ef80d856","analyzedAt":"2026-08-13T10:13:37.803Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}