pnpm: Wrong registry address with tfs npm

pnpm version:

0.65.2

Code to reproduce the issue:

Unknown

Expected behavior:

Packages should install.

Actual behavior:

Some of the packages could not be installed, sometimes all of them.

Additional information:

We use local tfs npm registry. its address is written correctly in npm config: registry = “http://ourhost/tfs/OurCollection/_packaging/npm-registry-name/npm/registry” npm install is working fine. When using pnpm, it is using the above url without the word “registry” at the end, so it gets 404 from tfs. The weird thing is that sometimes it is using the “registry” word for some of the packages, but it fails as soon as it is not using the word for a certain package. There were some attempts that I could say that it was using the right address for packages starting with a “@” and the wrong one for those that don’t start with it, but it is not consistent.

  • node -v prints: v6.9.5
  • Windows, OS X, or Linux?: Bash on Ubuntu on Windows

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Just found out that this package gives you the right token for requests made to get packages descriptions but not for download. The reason is that the token is for such a url: http://host/tfs/MyCollection/_packaging/MyNpmRegistry/npm/ (which is good also if you add the “registry”) but in tfs npm packages are downloaded from: http://host/tfs/MyCollection/_packaging/[pkgid]/npm/registry/[pkgname]

so I shortened the token url to end with “_packaging” and it worked! However, tfs instructs you to use the token with the full url, so maybe we need to save the token when we get the package description and use it to download,