npmnpm-publishnpmjs

How can I unpublish node module on npmjs?


I want to unpublish my project monetrum-node-client which I published before my personal account at npm and publish it from the company account. Is this possible? I'm waiting for your help.

Error I am getting;

PS C:\nodejs\prod\monetrum-node-client> npm unpublish monetrum-node- 
client --force
npm WARN using --force I sure hope you know what you are doing.
npm ERR! code E400
npm ERR! You can no longer unpublish this version. Please deprecate it 
instead
npm ERR! npm deprecate -f 'monetrum-node-client@*' "this package has 
been deprecated" : 12-7be182ce2a14ca2bb34c07a7707a75c0

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2019-04- 
01T12_24_19_378Z-debug.log
PS C:\nodejs\prod\monetrum-node-client>

How can I handle this problem?Thanks in advance.


Solution

  • Quote from official documentation:

    With the default registry (registry.npmjs.org), unpublish is only allowed with versions published in the last 72 hours. If you are trying to unpublish a version published longer ago than that, contact support@npmjs.com.

    Link - https://docs.npmjs.com/cli/unpublish