The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm deprecate giving Error E422 Unprocessable Entity
I’m trying to deprecate my team’s package as we’ve renamed it. I’m running:
npm deprecate primer-react@"*" "primer-react has been renamed to @primer/components, please install the renamed package."
I’ve also tried:
npm deprecate primer-react@"< 2.0.3-beta" "primer-react has been renamed to @primer/components, please install the renamed package"
Here’s the error I’m getting:
npm ERR! code E422 npm ERR! Unprocessable Entity : primer-react npm ERR! A complete log of this run can be found in: npm ERR! /Users/emplums/.npm/_logs/2018-09-21T22_35_10_731Z-debug.log
I’m on npm
6.4.1 and Node
10.1.0, I’ve also had a coworker try and he’s on npm
6.2.0 and Node
I thought maybe it was a permissions issue, but I doubled checked and both me & my coworker are owners of the package.
I’m pretty stumped! Would love to hear if anyone has any tips!
We have a bug that prevents us from deprecating packages with dashes in their version numbers. As a workaround for this, you are welcome to deprecate your specified package if you publish a placeholder. Please note you must publish it as a major version; otherwise, the workaround will not go in effect.
Let me know if this helps.
When you say publish a placeholder do you mean publish the next major version with just a readme and package.json? Is there a way to still get the deprecate message to show up in the CLI when users install the package?
Hi @emplums. Exactly! By new placeholder, I meant a project with just a package.json and README file. After specifying version 3.0.0 in your package.json, you’d have to run the
npm deprecate command again. This time (with the new major version indicated), we expect it to work. If not, let me know and I’ll dig in further.