Skip to content
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

[BUG] npm pack --dry-run undefined@undefined in an empty package #3099

Closed
aminnairi opened this issue Apr 19, 2021 · 0 comments
Closed

[BUG] npm pack --dry-run undefined@undefined in an empty package #3099

aminnairi opened this issue Apr 19, 2021 · 0 comments
Assignees
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@aminnairi
Copy link

Current Behavior:

If you try to run npm pack --dry-run on a package that has no name property in its package.json file, the output shows undefined@undefined for the package name and undefined-undefined.tgz for the filename.

Expected Behavior:

I think there should be a guard for when the name property, and even version and description properties are not set whenever running npm pack.

Steps To Reproduce:

steps to reproduce the behavior:

  1. Create an empty folder
  2. Change directory into the created folder
  3. Run npm pack --dry-run
  4. See that the notice says undefined@undefined without warnings

Environment:

  • OS: Linux archlinux 5.11.15-arch1-2 #1 SMP PREEMPT Sat, 17 Apr 2021 00:22:30 +0000 x86_64 GNU/Linux
  • Node: 15.14.0
  • npm: 7.7.6
@aminnairi aminnairi added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Apr 19, 2021
@wraithgar wraithgar self-assigned this Apr 19, 2021
@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants