title: NPM how do you install another dependency from a subdirectory of another Git repository?
body: <p>In package.json using npm, how do you install another dependency from a subdirectory of another Git repository?</p>
  
  <p>For example, I have tried:</p>
  
  <p>npm install
  my package.json .... </p>
  
  <pre><code>  "dependencies": {
      "some-package": "git+https://github.com/myTeam/myrepo.git#develop/folder-with-a-package-json",
      "lodash": "4.17.14"
    },
  </code></pre>
  
  <ul>
  <li>The remote dependency has valid package.json in the sub directory
  folder-with-a-package-json.</li>
  <li>The remote repo is public.</li>
  </ul>
  
  <p>Error:</p>
  
  <pre><code>npm ERR! code 1
  npm ERR! Command failed: git checkout develop/folder-with-a-package-json
  npm ERR! error: pathspec 'develop/folder-with-a-package-json' did not match any file(s) known to git 
  </code></pre>