{"record":{"id":"23a4c5ffefe38c79","repo":"denoland/deno","slug":"unexpected-third-argument-to-deno-bench","errorCode":null,"errorMessage":"Unexpected third argument to Deno.bench()","messagePattern":"Unexpected third argument to Deno\\.bench\\(\\)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"cli/js/40_bench.js","lineNumber":149,"sourceCode":"          \"Unexpected 'name' field in options, bench name is already provided as the first argument\",\n        );\n      }\n      benchDesc = {\n        ...defaults,\n        ...optionsOrFn,\n        fn: maybeFn,\n        name: nameOrFnOrOptions,\n      };\n    }\n  } else if (typeof nameOrFnOrOptions === \"function\") {\n    if (!nameOrFnOrOptions.name) {\n      throw new TypeError(\"The bench function must have a name\");\n    }\n    if (optionsOrFn != undefined) {\n      throw new TypeError(\"Unexpected second argument to Deno.bench()\");\n    }\n    if (maybeFn != undefined) {\n      throw new TypeError(\"Unexpected third argument to Deno.bench()\");\n    }\n    benchDesc = {\n      ...defaults,\n      fn: nameOrFnOrOptions,\n      name: nameOrFnOrOptions.name,\n    };\n  } else {\n    let fn;\n    let name;\n    if (typeof optionsOrFn === \"function\") {\n      fn = optionsOrFn;\n      if (nameOrFnOrOptions.fn != undefined) {\n        throw new TypeError(\n          \"Unexpected 'fn' field in options, bench function is already provided as the second argument\",\n        );\n      }\n      name = nameOrFnOrOptions.name ?? fn.name;\n    } else {","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/js/40_bench.js#L131-L167","documentation":"The configured desktop icon path, resolved by joining the config value with the initial working directory, does not exist on disk, so HMR startup cannot pass an icon to laufey.","triggerScenarios":"`deno desktop` (HMR/dev mode on macOS) with an `icon` pointing at a missing file: typo, wrong case, path relative to a different cwd, or an asset that has not been generated yet.","commonSituations":"Running the CLI from a directory other than the project root the config assumes; icons produced by an asset-generation step that has not run; case-sensitivity mismatches when a config authored on macOS is used on Linux.","solutions":["Verify the printed path exists and fix typos or letter casing","Run the command from the project root, or use an absolute path for the icon","Generate/copy the icon file first if it comes from a build or asset step"],"exampleFix":"# before\n# on-disk file is icons/App.png\n\"icon\": \"icons/app.png\"\n\n# after\n\"icon\": \"icons/App.png\"","handlingStrategy":"validation","validationCode":"const iconPath = resolve(projectRoot, iconFromConfig);\nawait Deno.stat(iconPath); // throws if missing — run before `deno desktop`","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve icon paths against the project root, not the ambient cwd","Commit icon assets to the repo or generate them in a pre-launch step","Case-check filenames when sharing configs across macOS and Linux"],"tags":["desktop","icons","filesystem","config","path"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}