pnpm: Cannot resolve external git packages
pnpm version: all
Code to reproduce the issue:
Add a custom git url as package.
"my-custom-package": "git+ssh://git@mygit.site/package.git#v0.1.7",
Expected behavior:
Resolves package
Actual behavior:
Does not resolve package.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 16 (7 by maintainers)
Indeed, it’s coming from npm-package-arg. I’ve opened #22 on them. Incidentally, it seems to happen only for non-github.com hosted repos.
A quick hack would be to use
saveSpec
rather thanfetchSpec
in fromRepo.ts and strip the initial ‘git+’. Let’s hope that’s not necessary if they response quickly.I can take a look – can you point me to the appropriate test file?
$ pnpm -v 0.65.4
Not fixed:
URL from our gitlab:
git@site:project/repo.git
package:"git+ssh://git@site:project/repo.git#master"
it changes url to:
ssh://git@site/:project/repo.git
than
ssh://git@site/project/repo.git
so
there is unwanted
:
in parsed url