Skip to content

[Support] npm dist-tag not available on Nexus, looking for workaround #293

@ghost

Description

Hi,

We have a private NPM registry at our company, using Nexus. They don't support npm dist-tag yet (NEXUS-9862). Since Nexus is pretty common for private NPM registries I imagine other people are also getting blocked by this.

Of 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 :).

When I run lerna publish I get the following error:

Error updating version as latest
Error: Command failed: npm dist-tag ls mypackagename
npm ERR! registry error parsing json
npm ERR! dist-tag ls Couldn't get dist-tag data for mypackagename

I've looked a bit at the usages of npm dist-tag in the source code, 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.

I 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')?

And 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions