[BUG] `npm install` started to hang on "still idealTree buildDeps" for 60 seconds if there are dependencies pointing to specific gitlab repository url (a regression compared to npm v6)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
See https://github.com/npm/cli/issues/1991#issuecomment-853984404
Current Behavior
npm install in a fresh project with an explicit git+ssh dependency on a gitlab repo (minimal example) takes 60+ seconds, seemingly it waits for some random network timeout before proceeding the installation.
Expected Behavior
npm install should take 2-3 seconds to install dependencies of the project in minimal example like it did in npm v6.
Steps To Reproduce
See https://gitlab.com/klesun/npm-seven-issue
I reproduced this hang in Ubuntu 20.04 with npm 7.15.1 as well as MacBook Pro 2019 with npm 7.15.1
git clone https://gitlab.com/klesun/npm-seven-issue.git
cd npm-seven-issue
npm install
package.json
{
"name": "npm-seven-issue",
"version": "0.0.1",
"devDependencies": {
"npm-seven-issue-dep": "git+ssh://git@gitlab.com/klesun/npm-seven-issue-dep#5f1b313978986974d4364585e6bd3689276f1697"
}
}
If you are using npm version prior to v7.x, for example v6.14.13, npm install should be done within 2-3 seconds.
If you are using npm version v7.0.0 or later, for example 7.15.1, npm install will hang for 60+ seconds with following text:
[....................] \ idealTree.pql-box: still idealTree buildDeps
Note, you need to remove package-lock.json and node_modules prior to retrying the npm install, otherwise issue won't reproduce.
Environment
- OS: Ubuntu 20.04
- Node: v16.2.0
- npm: 7.15.1
as well as
- OS: MacBook Pro 2019
- Node: v15.11.0
- npm: 7.15.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal repository's package.json and reproduce the issue by removing package-lock.json and node_modules, then running npm install with npm 7.15.1. Compare the behavior with npm 6.14.13 and inspect the dependency-resolution path for the git+ssh GitLab dependency. Done means the example installs in roughly 2–3 seconds without the 60-second idealTree delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, gitlab, javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100