{"action":"created","issue":{"url":"https://api.github.com/repos/lerna/lerna/issues/293","repository_url":"https://api.github.com/repos/lerna/lerna","labels_url":"https://api.github.com/repos/lerna/lerna/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/lerna/lerna/issues/293/comments","events_url":"https://api.github.com/repos/lerna/lerna/issues/293/events","html_url":"https://github.com/lerna/lerna/issues/293","id":168865532,"number":293,"title":"[Support] npm dist-tag not available on Nexus, looking for workaround","user":{"login":"MaartenVerbaarschot","id":10849154,"avatar_url":"https://avatars.githubusercontent.com/u/10849154?v=3","gravatar_id":"","url":"https://api.github.com/users/MaartenVerbaarschot","html_url":"https://github.com/MaartenVerbaarschot","followers_url":"https://api.github.com/users/MaartenVerbaarschot/followers","following_url":"https://api.github.com/users/MaartenVerbaarschot/following{/other_user}","gists_url":"https://api.github.com/users/MaartenVerbaarschot/gists{/gist_id}","starred_url":"https://api.github.com/users/MaartenVerbaarschot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaartenVerbaarschot/subscriptions","organizations_url":"https://api.github.com/users/MaartenVerbaarschot/orgs","repos_url":"https://api.github.com/users/MaartenVerbaarschot/repos","events_url":"https://api.github.com/users/MaartenVerbaarschot/events{/privacy}","received_events_url":"https://api.github.com/users/MaartenVerbaarschot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-02T11:45:57Z","updated_at":"2016-11-21T08:23:56Z","closed_at":null,"body":"Hi,\n\nWe have a private NPM registry at our company, using Nexus. They don't support npm dist-tag yet ([NEXUS-9862](https://issues.sonatype.org/browse/NEXUS-9862)). Since Nexus is pretty common for private NPM registries I imagine other people are also getting blocked by this. \n\nOf course, ideally Nexus introduces npm dist-tag soon and this issue would be resolved. But in the meantime, I would like to check if there is a workaround :). \n\nWhen I run `lerna publish` I get the following error:\n\n```\nError updating version as latest\nError: Command failed: npm dist-tag ls mypackagename\nnpm ERR! registry error parsing json\nnpm ERR! dist-tag ls Couldn't get dist-tag data for mypackagename\n```\n\nI've looked a bit at the [usages of npm dist-tag in the source code](https://github.com/lerna/lerna/blob/49e2ade19cc76b1fc65badfdbd87aef151edd297/src/commands/PublishCommand.js#L394-L404), and because they're in a try/catch block, the publishing still succeeds. However, my Jenkins build will be marked as 'broken' because there are errors.\n\nI was wondering if the npm dist-tag is strictly needed to work with Lerna? It only marks the published packages as the latest, right? So, am I correct that we could work around this error by working with exact version numbers in all our package.json files (thus not depending on what is marked as the 'latest')?\n\nAnd if the above is correct, would you be open to introducing an option for lerna to skip the use of dist-tag? (e.g. `lerna publish --skip-npm-dist-tag`)\n"},"comment":{"url":"https://api.github.com/repos/lerna/lerna/issues/comments/261872956","html_url":"https://github.com/lerna/lerna/issues/293#issuecomment-261872956","issue_url":"https://api.github.com/repos/lerna/lerna/issues/293","id":261872956,"user":{"login":"timche","id":8075074,"avatar_url":"https://avatars.githubusercontent.com/u/8075074?v=3","gravatar_id":"","url":"https://api.github.com/users/timche","html_url":"https://github.com/timche","followers_url":"https://api.github.com/users/timche/followers","following_url":"https://api.github.com/users/timche/following{/other_user}","gists_url":"https://api.github.com/users/timche/gists{/gist_id}","starred_url":"https://api.github.com/users/timche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timche/subscriptions","organizations_url":"https://api.github.com/users/timche/orgs","repos_url":"https://api.github.com/users/timche/repos","events_url":"https://api.github.com/users/timche/events{/privacy}","received_events_url":"https://api.github.com/users/timche/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T08:23:56Z","updated_at":"2016-11-21T08:23:56Z","body":"@szarouski It just worked for me with Sinopia, sorry 😞 "}}
{"actor":{"display_login":"timche"}}