{"record":{"id":"14645047fe09550e","repo":"denoland/deno","slug":"you-did-not-specify-an-entrypoint-in-add-expo","errorCode":null,"errorMessage":"You did not specify an entrypoint in {}. Add `exports` mapping in the configuration file, eg:\n{}","messagePattern":"You did not specify an entrypoint in (.+?)\\. Add `exports` mapping in the configuration file, eg:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/publish/mod.rs","lineNumber":1596,"sourceCode":"  for entrypoint in SUGGESTED_ENTRYPOINTS {\n    if deno_json.dir_path().join(entrypoint).exists() {\n      suggested_entrypoint = Some(entrypoint);\n      break;\n    }\n  }\n\n  let exports_content = format!(\n    r#\"{{\n  \"name\": \"{}\",\n  \"version\": \"{}\",\n  \"exports\": \"{}\"\n}}\"#,\n    deno_json.json.name.as_deref().unwrap_or(\"@scope/name\"),\n    deno_json.json.name.as_deref().unwrap_or(\"0.0.0\"),\n    suggested_entrypoint.unwrap_or(\"<path_to_entrypoint>\")\n  );\n\n  bail!(\n    \"You did not specify an entrypoint in {}. Add `exports` mapping in the configuration file, eg:\\n{}\",\n    deno_json.specifier,\n    exports_content\n  );\n}\n\n#[allow(clippy::print_stderr, reason = \"actually want to output\")]\nfn ring_bell() {\n  // ASCII code for the bell character.\n  eprint!(\"\\x07\");\n}\n\n#[cfg(test)]\nmod tests {\n  use std::collections::HashMap;\n\n  use deno_ast::ModuleSpecifier;\n","sourceCodeStart":1578,"sourceCodeEnd":1614,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/publish/mod.rs#L1578-L1614","documentation":"A JSR package must expose an entrypoint through the `exports` field of its config file. This error is raised (by `error_missing_exports_field`) for a config that has a name but no exports mapping, and the message embeds a ready-to-paste deno.json snippet — using a suggested entrypoint (e.g. ./mod.ts or ./index.ts) when one is detected in the package.","triggerScenarios":"`deno publish` with a deno.json/jsr.json that defines `name` (and no `\"publish\": false`) but no `exports` field, so the package has no public entrypoint to publish.","commonSituations":"New packages scaffolded from a bare deno.json; converting an internal library to JSR; accidentally deleting or renaming the exports key.","solutions":["Add an `exports` mapping to deno.json, e.g. `\"exports\": \"./mod.ts\"`, or a subpath map for multi-entry packages.","Point it at the file that should be the public entrypoint — the snippet's suggested path is usually correct.","If this package is not meant for JSR, mark it `\"publish\": false` instead of adding exports."],"exampleFix":"// deno.json (before)\n{\n  \"name\": \"@scope/pkg\",\n  \"version\": \"1.0.0\"\n}\n// deno.json (after)\n{\n  \"name\": \"@scope/pkg\",\n  \"version\": \"1.0.0\",\n  \"exports\": \"./mod.ts\"\n}","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nnode -e '\nconst c = JSON.parse(require(\"fs\").readFileSync(\"deno.json\", \"utf8\"));\nif (!c.exports) { console.error(\"deno.json needs an exports entrypoint, e.g. \\\"exports\\\": \\\"./mod.ts\\\"\"); process.exit(1); }'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every JSR package config needs `name`, `version`, and `exports` — check all three in a pre-publish script.","Point exports at the real public entrypoint (commonly ./mod.ts) and cover extra subpaths with a map.","Mark non-published configs with `\"publish\": false` so they fail with a clearer error instead."],"tags":["publish","deno-json","exports","entrypoint","jsr"],"backgroundTag":"missing-exports-field","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}