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
- fix: always end a registry URL with a slash Ref #718 — committed to pnpm/pnpm by zkochan 7 years ago
- fix: authorization during tarball fetch Close #718, Close #708 — committed to pnpm/pnpm by zkochan 7 years ago
- fix: authorization during tarball fetch Close #718, Close #708 — committed to pnpm/pnpm by zkochan 7 years ago
- test: installing of private package from shrinkwrap When resolution is saved in cache and the meta info is on a different path. Correct auth info should be used for downloading the tarball. Close #7... — committed to pnpm/pnpm by zkochan 7 years ago
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,