-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 10.x
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
While executing the following command:
npm deprecate [email protected] "message"The command exits with a status code of 0 and no output. This is because the dd-trace-js package doesn't have a version 4.21.0 associated with it. This was due to my error, I meant to use npm deprecate dd-trace but had made a typo.
Overall this caused some head scratching. Even the --verbose output didn't provide any hints, everything was happy 200 responses.
Expected Behavior
I would expect the command to display a warning message when the operation matches 0 package versions.
I suspect the command "succeeds" conceptually as the command really means "deprecate the given range of packages" and that range is 0 packages. But really I want a warning that no package versions matched the range to help me debug the situation.
Steps To Reproduce
- Using macOS
- Authenticate using auth flow with
npm adduserand supplying OTP via website - Run
npm deprecate package-name@version "reason" - See that nothing happens
Environment
- npm: 10.4.0, 10.3.0
- Node.js: 18.19.0, 20.11.0, 20.10.0
- OS Name: macOS
- System Model Name: Darwin Kernel Version 23.2.0 / Apple M1 Max
- npm config:
; "user" config from /Users/thomas.hunter/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; node bin location = /Users/thomas.hunter/.nvm/versions/node/v20.11.0/bin/node
; node version = v20.11.0
; npm local prefix = /Users/thomas.hunter/Projects/dd-trace-js
; npm version = 10.4.0
; cwd = /Users/thomas.hunter/Projects/dd-trace-js
; HOME = /Users/thomas.hunter
; Run `npm config ls -l` to show all defaults.Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 10.x