# Resolving the 'latest' tag for the npm group repository

**URL:** <https://community.sonatype.com/t/resolving-the-latest-tag-for-the-npm-group-repository/1056>\
**Category:** Sonatype Nexus Repository\
**Created:** [January 16, 2019, 12:57am UTC](https://community.sonatype.com/t/resolving-the-latest-tag-for-the-npm-group-repository/1056 "2019-01-16T00:57:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![igor.muntyan](https://avatars.discourse-cdn.com/v4/letter/i/2acd7d/32.png) [@igor.muntyan](https://community.sonatype.com/u/igor.muntyan)\
**Post date:** [January 16, 2019, 12:57am UTC](https://community.sonatype.com/t/resolving-the-latest-tag-for-the-npm-group-repository/1056/1 "2019-01-16T00:57:22Z")

</div>

I have an npm group repository called npm-group that contains the following repositories, in the order listed:

npm-snapshot - hosted  
npm-hosted - hosted  
npm-proxy - proxy

The npm-snapshot is used for snapshots and npm-hosted contains non-snapshot versions.

A specific library version 1.0.5 has been published to npm-hosted. After that, the version 1.0.4-SNAPSHOT has been published to the npm-snapshot. So I assume that both repositories contain now the library with the ‘latest’ tag; the npm-snapshot latest tag resolves to 1.0.4-SNAPSHOT and the npm-hosted latest tag resolves to 1.0.5

Now, if I get the latest library from the npm-group, I would expect to get the version 1.0.4-SNAPSHOT as the npm-snapshot repo is listed as a first member of the npm-group. What I get however is the version 1.0.5.

If I remove the npm-hosted repo from the npm-group’s list so it becomes:

npm-snapshot - hosted  
npm-proxy - proxy

then I get the expected version 1.0.4-SNAPSHOT

Is this an expected behavior and why?

(Edit - it is possible that the 1.0.4-SNAPSHOT has been published first, then the 1.0.5 and after that the 1.0.4-SNAPSHOT has been again overwritten)

Thanks a lot!

---

_[View the full topic](https://community.sonatype.com/t/resolving-the-latest-tag-for-the-npm-group-repository/1056)._
