npm freezes when I am installing anything. Even after deleting package-lock.json nothing changed. Here is a similar question. Can anyone tell how can I solve this problem??
It could be your having an issue with your certificates. Sometimes if you get this behavior there is an error in the certificate chain.
Try npm set strict-ssl false to see if this resolves your issue. Just remember if you do this you have disabled some of the security ssl gives you.
In my case it was a regresion in npm v7.x related to dependencies pointing to specific gitlab url:
"devDependencies": {
"npm-seven-issue-dep": "git+ssh://git@gitlab.com/klesun/npm-seven-issue-dep#5f1b313978986974d4364585e6bd3689276f1697"
}
Here is the bug report.
From what I observe, this freeze takes around 60 seconds (some network timeout perhaps) then installation finishes successfully.
Updating my npm using npm install -g npm@latest solved the issue.