Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Once a package is published to Artifactory, only that single version will be available to npm clients #22

Closed
lptr opened this issue Dec 11, 2013 · 3 comments

Comments

@lptr
Copy link

lptr commented Dec 11, 2013

Say, I have a project that requires somemodule version 1.6 and in some other branch of the dependency tree it also uses somemodule version 2.4. If no versions of somemodule are present in Artifactory, everything works fine: both versions are downloaded from npmjs.org.

However, if I npm publish version 1.6 to Artifactory (but not version 2.4), next time I try to do npm install in my project, I get an error saying that somemodule version 2.4 requirement cannot be satisfied, and my build fails.

I guess this is because metadata from Artifactory about what versions are available is not merged with that from npmjs.org, so the npm client only knows about those versions that are available on Artifactory.

@anacronw
Copy link
Member

ahh I see, the expected behavior is effectively the fix for #18, in this case:

  1. look up version 2.4 in artifactory, since not found, look up npmjs.org
  2. cache the package into artifactory, send the user a copy of it

Honestly, I had thought that even if #18 is not fixed, the abstraction was still good enough. Seems like that is not true as pointed out by your this case.

I'll take a look at it in the next couple days, and I'm more than willing to accept any PR's :)

The fix would be in these lines: https://github.com/AceMetrix/npm-artifactory/blob/master/routes/list.js#L50-L53

Basically, piping to the user is not sufficient - need to do two things instead of 1.

@anacronw
Copy link
Member

I just published a new version on npm, let me know if this fixes your use case

@lptr
Copy link
Author

lptr commented Dec 28, 2013

Thanks, I'll take a look sometime next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants