Skip to content

Conversation

milaninfy
Copy link
Contributor

@milaninfy milaninfy commented Jun 10, 2025

When custom hosted git url are used to install dependencies it's not installing that dependency when the url is of git+ssh://[email protected]:a/b/c.git format instead of git+ssh://[email protected]/a/b/c.git.

Cause:

new URL(resolved) throws an error which is getting caught and in-turn results in removal of that node.
This behaviour was working as expected before this #8185 which replaced hgi.parseUrl(resoved) call to new URL(resolved)

Fix:

keep the hgi.parseUrl call to correctly parse the git url as mentioned/explained in this PR #5758

Fixes: #8331

@milaninfy milaninfy force-pushed the mm/fix-resolved-git-url branch from a45ba27 to 0766793 Compare June 10, 2025 17:28
@milaninfy milaninfy marked this pull request as ready for review June 10, 2025 17:29
@milaninfy milaninfy requested a review from a team as a code owner June 10, 2025 17:29
@milaninfy milaninfy changed the title fix: use hosted-git-info to correctly parse resolved git urls fix(arborist): use hosted-git-info to correctly parse resolved git urls Jun 10, 2025
@wraithgar wraithgar merged commit 887385d into npm:latest Jun 10, 2025
18 checks passed
@github-actions github-actions bot mentioned this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] npm 11.4.1 unable to install packages from git repo

2 participants