Peer dependency error with git repos #3307

Closed
donaldpipowitch opened this Issue Apr 2, 2013 · 6 comments

Comments

Projects
None yet
3 participants

Hi all,

is it possible to test peer dependencies with git repositories? I always get the following error:

npm ERR! peerinvalid The package repo-a does not satisfy its siblings' peerDependencies requirements!

Say I have the following node_modules as git repositories: repo-a, repo-b, repo-c. repo-b and repo-c peer depend on repo-a. The peer dependency is configured as "peerDependencies": { "repo-a": "git+ssh://git@github.com:my-account/repo-a.git" } in repo-b and repo-c. So basically both depend on the latest and same commit. (It doens't work with version tags either.)

Any ideas? Isn't it possible to test local peer dependencies without using a private npm or non-node_modules (aka just some git repos)?

Here is a test case: https://github.com/donaldpipowitch/test-example

The requested repo from the peer dependency will be downloaded, but throws an error.

Other questions:

  1. Does npm checks version conflicts in commit-ish semver tags? E.g. both modules from my test case request Bootstrap as #v2.2.2, would an error be thrown if one requests #v2.2.2 and the other one #v2.2.3?
  2. Can I shrinkwrap commit-ish semver tags? Will npm resolve #v2.2.x to the latest v2.2.x-tag?
  3. If 1. and 2. do not work, do you plan to implement this feature? If not, would accept a pull request if somebody else would do this?
Member

domenic commented Apr 6, 2013

Dupe of #3218, which is on my to-do list. I don't know the answer to your question 2 though, so I'll leave this open until someone can answer.

If this is a dupe, I will close this issue and create a dedicated issue for question 2. Thank you!

@donaldpipowitch what was the issue created for question 2?

(and just to clarify, this still doesn't work, right? we're running into the same issue)

I'm sorry. I think I didn't create an issue for question 2. I don't know if it was solved by now (- I only know that Bower has this feature, so it shouldn't be that difficult to get it to npm).

@hellatan hellatan added a commit to 1stdibs/eslint-config-1stdibs that referenced this issue Jan 8, 2016

@hellatan hellatan removed peerDep since there's an issue with git urls 95fd706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment