npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm install doesn't work when using a private github repo

What I Wanted to Do

I wanted to install a private github repo

npm install my-org/my-repo

where “my-org/my-repo” is a private github repo.

I have all the credentials set up right, the installation actually goes smoothly.

What Happened Instead

The installation goes ok, it’s just that ./node_modules folder never gets populated.

Reproduction Steps

  1. Create a private github repo
  2. install that repo locally

Platform Info

$ npm --versions
{ npm: '6.0.1',
  ares: '1.14.0',
  cldr: '33.0',
  http_parser: '2.8.0',
  icu: '61.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.5.0',
  openssl: '1.1.0h',
  tz: '2018c',
  unicode: '10.0',
  uv: '1.20.3',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform

Note: I’m unable to reproduce this with private repositories, myself. I’m inclined to assume this is a user misconfiguration/support issue unless a more specific repro that actually works for me pops up.

Yep, my mistake. I had specified a different package name in the dependency than what was specified in its package.json “name” field.