{"record":{"id":"8835f24aa8eba3c9","repo":"Budibase/budibase","slug":"package-json-is-missing-one-of-name-version-o","errorCode":null,"errorMessage":"package.json is missing one of 'name', 'version' or 'description'.","messagePattern":"package\\.json is missing one of 'name', 'version' or 'description'\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/plugins/index.ts","lineNumber":137,"sourceCode":"    type,\n    name,\n    description,\n    version,\n  })\n}\n\nasync function verify() {\n  // will throw errors if not acceptable\n  checkInPlugin()\n  console.log(info(\"Verifying plugin...\"))\n  const schema = fs.readFileSync(\"schema.json\", \"utf8\")\n  const pkg = fs.readFileSync(\"package.json\", \"utf8\")\n  let name, version\n  try {\n    const schemaJson = JSON.parse(schema)\n    const pkgJson = JSON.parse(pkg)\n    if (!pkgJson.name || !pkgJson.version || !pkgJson.description) {\n      throw new Error(\n        \"package.json is missing one of 'name', 'version' or 'description'.\"\n      )\n    }\n    name = pkgJson.name\n    version = pkgJson.version\n    plugins.validate(schemaJson)\n    return { name, version }\n  } catch (err: any) {\n    if (err && err.message && err.message.includes(\"not valid JSON\")) {\n      console.log(error(`schema.json is not valid JSON: ${err.message}`))\n    } else {\n      console.log(error(`Invalid schema/package.json: ${err.message}`))\n    }\n  }\n}\n\nasync function build() {\n  const verified = await verify()","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/cli/src/plugins/index.ts#L119-L155","documentation":"verify parses package.json and requires the name, version and description fields to be present and non-empty before validating schema.json. These are the metadata used to register and display the plugin, so verify refuses incomplete manifests.","triggerScenarios":"Running `budibase-plugins verify` (via verified) where the parsed package.json is missing or has an empty/falsy name, version, or description field.","commonSituations":"Hand-authored package.json with description omitted; version left as empty string; a minimal package.json from `npm init -y` where description was never added; fields accidentally removed during edits.","solutions":["Open package.json and add non-empty name, version and description fields, then re-run verify","Run `npm pkg get name version description` to see which field is missing or empty","Re-scaffold from the plugin template if the manifest is severely incomplete"],"exampleFix":"// before\n{\n  \"name\": \"my-plugin\"\n}\n// after\n{\n  \"name\": \"my-plugin\",\n  \"version\": \"1.0.0\",\n  \"description\": \"My Budibase plugin\"\n}","handlingStrategy":"validation","validationCode":"const pkg = JSON.parse(fs.readFileSync(\"package.json\", \"utf8\"))\nconst missing = [\"name\", \"version\", \"description\"].filter(k => !pkg[k])\nif (missing.length) throw new Error(`package.json missing: ${missing.join(\", \")}`)","typeGuard":"const hasRequiredPkgFields = (p: any): p is { name: string; version: string; description: string } =>\n  Boolean(p && p.name && p.version && p.description)","tryCatchPattern":"try {\n  await verifyPlugin()\n} catch (err) {\n  if ((err as Error).message.includes(\"missing one of 'name', 'version'\")) {\n    // fix package.json fields then retry\n  } else throw err\n}","preventionTips":["Always fill in name, version and description when scaffolding package.json","Run `npm pkg get name version description` as a preflight check","Validate package.json in CI before running plugin verify"],"tags":["cli","plugin","package-json","validation"],"backgroundTag":"missing-package-json-fields","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}