chocolatey / chocolatey/choco

Chocolatey CLI does not function at all when "Not a valid nupkg" error is shown

Open
#3,550 3 comments 0 reactions 0 assignees View on GitHub
0 - Triaging Bug Customer
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] I confirm there are no unresolved issues reported on the [Chocolatey Status page](https://status.chocolatey.org).
- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my problem.
- [x] I have verified this is not an issue for a specific package.
- [x] I have verified this issue is not security related.
- [x] I confirm I am using **official**, and **not** unofficial, or modified, Chocolatey products.

### What You Are Seeing?

When a package exists in the `lib` folder, but does not have any corresponding entries in the `.chocolatey` folder, the error 'Not a valid nupkg file' is shown. This stops Chocolatey CLI from doing anything else until the problem is resolved.

![Image](https://github.com/user-attachments/assets/aa337376-2b60-43d8-8e2e-fa4ec4f07955)

### What is Expected?

If there is a problem with a particular package, Chocolatey CLI should warn the user, but should still function. If possible, it should let the user know what they should do and what the error is (i.e., no equivalent package ID in `.chocolatey` folder for example).

### How Did You Get This To Happen?

See the [Zendesk ticket](https://chocolatey.zendesk.com/agent/tickets/24064) for more information. Note that there is also a script that was created to resolve the problem in that ticket.

### System Details

N/A

### Installed Packages

N/A

### Output Log

See the [Zendesk ticket](https://chocolatey.zendesk.com/agent/tickets/24064) for more information.

### Additional Context

This is related to a [Zendesk ticket](https://chocolatey.zendesk.com/agent/tickets/24064).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked Zendesk ticket and the referenced script to reproduce the state where a package exists in lib but has no corresponding .chocolatey entry. Trace how the 'Not a valid nupkg file' error prevents further Chocolatey CLI operations; done means the affected package is identified with actionable guidance while unrelated CLI functions continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.