虽然在饥饿期间(伟大的计划)在NPM模块上工作,但我碰到了错误的版本。 “没问题”我想。 “我以前做过,并使用npm unpublish <module>@<version>
解决了。”我做了这个并尝试重新发布但它抛出错误“无法替换以前发布的版本”尽管这个版本不存在。
我决定去核。我的软件包只有10个版本,因此我决定npm unpublish <module> --force
并从v0.0.1重新开始。我仍然得到“无法取代以前发布的版本”。
HELP !!!我该如何解决这个问题,以便我可以把我的包装回来?
以下错误日志
npm publish v0.0.1.tar.gz
npm http PUT https://registry.npmjs.org/datautils
npm http 403 https://registry.npmjs.org/datautils
npm http PUT https://registry.npmjs.org/datautils
npm http 403 https://registry.npmjs.org/datautils
npm ERR! publish Failed PUT 403
npm ERR! Error: forbidden Cannot replace previously published version: 0.0.1: datautils
npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "publish" "datautils-js-0.0.1.tar.gz"
npm ERR! cwd /home/semms/Desktop/datautils
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/semms/Desktop/datautils/npm-debug.log
npm ERR! not ok code 0
答案 0 :(得分:11)
答案 1 :(得分:4)
如果包裹小于 24小时
,您可以取消发布 npm unpublish --force <package_name>@<version>