Stuck at npm install at fechMetadata checking installable status

16,364

Solution 1

npm install -g @angular/cli --verbose

After running this command I realized npm was having problems with the connection with registry.npmjs.org

To solve this:

  1. npm config set registry "http://registry.npmjs.org"
  2. npm set maxsockets 3

Viewed here

Solution 2

In my case I had to wait for a few minutes and npm finally installed by package. Also I suggest to use --verbose flag to see what's actually is going.

Solution 3

To anyone still experiencing this, I spent days searching for a solution, it ended up being easier and more effective to just remove all traces of nvm (and its node) from my machine and reinstall. Everything started working smooth again after the reinstall

I did:

brew uninstall nvm
rm -rf $NVM_DIR ~/.nvm ~/.npm ~/.bower

# remove nvm entries from my .bash_profile|.bashrc then
# installed nvm from nvm's install script

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash

# add to bash_profile

cat << EOF >> ~/.bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
EOF

source ~/.bash_profile
nvm install --lts
 

Solution 4

For me the issue is that the package I was trying to install had this in its package.json:

"dependencies": {
    [...]
    "mobx-utils": "github:Venryx/mobx-utils#5.5.2_VPatch2"
}

Normally that works fine, but apparently today, NPM decided to hang on the call to retrieve the library contents from the GitHub repo.

I used Process Hacker 2 to investigate what exact command was hanging, and it was the following:

git.exe ls-remote -h -t git://github.com/Venryx/mobx-utils.git

In my case, I worked around the issue by just manually installing the subdependencies (and copy-pasting the mobx-utils library itself), but this is of course not ideal.

UPDATE: The issue is that I was running an outdated version of Git for Windows. Once I updated it to the latest version (v2.28.0), the issue was resolved. (ie. installing based on github urls/branches started working just fine again)

Solution 5

You may need to specify your proxy server in the global Git configuration, like this:

git config --global http.proxy http://your-proxy-server:port
git config --global https.proxy http://your-proxy-server:port

And since you mentioned you're using Git for Windows, best to put this into the system wide configuration, too (repeat these commands with --system instead of --global).

Theoretically, the global config should take precedence over the system config, but sometimes when using npm install on Windows, the global config seems to be ignored or not found. I suspect this can happen when there are conflicting settings in the USERPROFILE and HOMESHARE env vars, in which case Git may be confused and look in different places depending on how it is invoked.

Share:
16,364

Related videos on Youtube

AnaCS
Author by

AnaCS

Updated on October 15, 2022

Comments

  • AnaCS
    AnaCS over 1 year

    Suddently I can't install angular I get stuck at the npm install command "npm install -g @angular/cli" It stays forever on this "checking installable status".

    my node version is 8.11.3 (yes I already tried to uninstall node and double checked to see it was really uninstalled) this was the version I had before and was working fine my npm -v gives 5.6.0

    then I run the angular command to install angular and it seems to freezing or very very very slow....

    • Senal
      Senal over 5 years
      Did you try clearing your npm cache? npm cache clean --force
    • AnaCS
      AnaCS over 5 years
      yes I did, I am reaching the conclusion this happened right after I installed git for windows so this is related to git and the cmd
    • Nicolai Weitkemper
      Nicolai Weitkemper almost 5 years
      Waiting a few more minutes worked for me
  • teleman
    teleman about 4 years
    This worked for me. Checking installable status was hanging the install when trying to create a new react app: npx create-react-app react_test
  • Tafadzwa Chimberengwa
    Tafadzwa Chimberengwa over 2 years
    npm config set registry "registry.npmjs.org", solved the issue for me