Skip to content

Confusing error message when trying to publish a package without a name #27116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
krlwlfrt opened this issue Nov 27, 2024 · 0 comments · Fixed by #27131
Closed

Confusing error message when trying to publish a package without a name #27116

krlwlfrt opened this issue Nov 27, 2024 · 0 comments · Fixed by #27131
Labels
bug Something isn't working correctly jsr Issues or feature requests relating to JSR.io publish Related to "deno publish" subcommand

Comments

@krlwlfrt
Copy link

Version: Deno 2.1.1

I just tried to publish a package and had not yet added a name to deno.json. But the error was, that I was missing an entrypoint.

deno publish --dry-run
error: You did not specify an entrypoint in deno.json. Add `exports` mapping in the configuration file, eg:
{
  "name": "@scope/name",
  "version": "0.0.0",
  "exports": "mod.ts"
}

Steps to reproduce:

Create deno.json with the following content in an empty directory:

{
  "exports": "mod.ts",
  "version": "0.0.1"
}

Run deno publish --dry-run.

@lucacasonato lucacasonato added bug Something isn't working correctly publish Related to "deno publish" subcommand jsr Issues or feature requests relating to JSR.io labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly jsr Issues or feature requests relating to JSR.io publish Related to "deno publish" subcommand
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants