This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3k
npm tag stable throwing server-side couchdb stack trace error #167
Comments
Nevermind - was specifying package name incorrectly: node-control instead of control |
Nasty that you got a stack trace anyhow. I should catch this error and return a 404 or something. |
Fixed on 439029ff1f049f931c4ad0fe07fda398e22898e7 of js-registry |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
npm it worked if it ends with ok
npm configfile /home/tsmith/.npmrc
npm cli [ 'tag', 'node-control@0.1.4', 'stable' ]
npm version 0.1.20
npm PUT node-control/stable
npm ! Error: render_error function raised error: (new TypeError("latest has no properties", "", 70))
stacktrace: ("0.1.4",[object Object])@:70
apply([object Object],[object Array])@:0
runUpdate(function (doc, req) {var semver = /v?([0-9]+).([0-9]+).([0-9]+)([a-zA-Z-][a-zA-Z0-9-]_)?/;
function toISOString(d) {
function pad(n) {return n < 10 ? "0" + n : n;}
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "Z";}
var now = toISOString(new Date);
function error(reason) {return [{forbidden:reason}, JSON.stringify({forbidden:reason})];}
if (doc) {if (req.query.version) {var parsed = semver(req.query.version);if (!parsed) {var tag = req.query.version;parsed = semver(JSON.parse(req.body));if (!parsed) {return error("setting tag " + req.query.version + " to invalid version: " + req.body);}doc['dist-tags'][req.query.version] = JSON.parse(req.body);doc.mtime = now;return [doc, JSON.stringify({ok:"updated tag"})];}if (req.query.version in doc.versions) {return error("cannot modify existing version");}var body = JSON.parse(req.body);body.ctime = body.mtime = doc.mtime = now;doc['dist-tags'].latest = body.version;doc.versions[req.query.version] = body;return [doc, JSON.stringify({ok:"added version"})];}var newdoc = JSON.parse(req.body), changed = false;if (doc._rev && doc._rev !== newdoc._rev) {return error("must supply latest rev to update existing package");}for (var i in newdoc) {if (typeof newdoc[i] === "string" || i === "maintainers") {doc[i] = newdoc[i];}}if (newdoc.versions) {doc.versions = newdoc.versions;doc['dist-tags'] = newdoc['dist-tags'];}doc.mtime = now;return [doc, JSON.stringify({ok:"updated package metadata"})];} else {doc = JSON.parse(req.body);if (!doc.versions) {doc.versions = {};}var latest;for (var v in doc.versions) {doc.versions[v].ctime = doc.versions[v].mtime = now;latest = v;}doc['dist-tags'].latest = latest;if (!doc['dist-tags']) {doc['dist-tags'] = {};}doc.ctime = doc.mtime = now;return [doc, JSON.stringify({ok:"created new entry"})];}},[object Object],[object Array])@/share/couchdb/server/main.js:920
(function (doc, req) {var semver = /v?([0-9]+).([0-9]+).([0-9]+)([a-zA-Z-][a-zA-Z0-9-])?/;
function toISOString(d) {
function pad(n) {return n < 10 ? "0" + n : n;}
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "Z";}
var now = toISOString(new Date);
function error(reason) {return [{forbidden:reason}, JSON.stringify({forbidden:reason})];}
if (doc) {if (req.query.version) {var parsed = semver(req.query.version);if (!parsed) {var tag = req.query.version;parsed = semver(JSON.parse(req.body));if (!parsed) {return error("setting tag " + req.query.version + " to invalid version: " + req.body);}doc['dist-tags'][req.query.version] = JSON.parse(req.body);doc.mtime = now;return [doc, JSON.stringify({ok:"updated tag"})];}if (req.query.version in doc.versions) {return error("cannot modify existing version");}var body = JSON.parse(req.body);body.ctime = body.mtime = doc.mtime = now;doc['dist-tags'].latest = body.version;doc.versions[req.query.version] = body;return [doc, JSON.stringify({ok:"added version"})];}var newdoc = JSON.parse(req.body), changed = false;if (doc._rev && doc._rev !== newdoc._rev) {return error("must supply latest _rev to update existing package");}for (var i in newdoc) {if (typeof newdoc[i] === "string" || i === "maintainers") {doc[i] = newdoc[i];}}if (newdoc.versions) {doc.versions = newdoc.versions;doc['dist-tags'] = newdoc['dist-tags'];}doc.mtime = now;return [doc, JSON.stringify({ok:"updated package metadata"})];} else {doc = JSON.parse(req.body);if (!doc.versions) {doc.versions = {};}var latest;for (var v in doc.versions) {doc.versions[v].ctime = doc.versions[v].mtime = now;latest = v;}doc['dist-tags'].latest = latest;if (!doc['dist-tags']) {doc['dist-tags'] = {};}doc.ctime = doc.mtime = now;return [doc, JSON.stringify({ok:"created new entry"})];}},[object Object],[object Array])@/share/couchdb/server/main.js:989
apply(null,[object Array])@:0
("_design/app",[object Array],[object Array])@/share/couchdb/server/main.js:1344
apply(null,[object Array])@:0
()@/share/couchdb/server/main.js:1386
@/share/couchdb/server/main.js:1397
npm failure try running: 'npm help tag'
npm failure Report this entire log at http://github.com/isaacs/npm/issues
npm failure or email it to npm-@googlegroups.com
npm not ok
Local node is 0.1.100 on 7.2-RELEASE-p2 FreeBSD
The text was updated successfully, but these errors were encountered: