{"record":{"id":"37e9cc901b311d84","repo":"mochajs/mocha","slug":"err-mocha-invalid-arg-value-37e9cc","errorCode":"ERR_MOCHA_INVALID_ARG_VALUE","errorMessage":"run() was unable to deserialize the options","messagePattern":"run\\(\\) was unable to deserialize the options","errorType":"validation","errorClass":"InvalidArgumentValueError","httpStatus":null,"severity":"error","filePath":"lib/nodejs/worker.cjs","lineNumber":91,"sourceCode":"      \"file\",\n      \"string\",\n    );\n  }\n\n  debug(\"run(): running test file %s\", filepath);\n\n  if (typeof serializedOptions !== \"string\") {\n    throw createInvalidArgumentTypeError(\n      \"run() expects second parameter to be a string which was serialized by the `serialize-javascript` module\",\n      \"serializedOptions\",\n      \"string\",\n    );\n  }\n  let argv;\n  try {\n    argv = eval(\"(\" + serializedOptions + \")\");\n  } catch {\n    throw createInvalidArgumentValueError(\n      \"run() was unable to deserialize the options\",\n      \"serializedOptions\",\n      serializedOptions,\n    );\n  }\n\n  const opts = Object.assign({ ui: \"bdd\" }, argv, {\n    // if this was true, it would cause infinite recursion.\n    parallel: false,\n    // this doesn't work in parallel mode\n    forbidOnly: true,\n    // it's useful for a Mocha instance to know if it's running in a worker process.\n    isWorker: true,\n  });\n\n  await bootstrap(opts);\n\n  opts.rootHooks = rootHooks;","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/mochajs/mocha/blob/6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a/lib/nodejs/worker.cjs#L73-L109","documentation":"Error \"run() was unable to deserialize the options\" thrown in mochajs/mocha.","triggerScenarios":"Thrown at lib/nodejs/worker.cjs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a","analyzedAt":"2026-09-01T03:41:47.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}