npm install gets stuck at fetchMetadata










10















I'm currently unable to run npm install in any project since today.
I'm running node v8.2.1 & npm 5.3.0 (installed via nvm).



When typing npm install it gets stuck on fetchMetadata everytime:
⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill pacote range manifest for longest@^1.0.1 fetched in 197ms



I've tried switching back to npm 5.0.3 which worked flawless, but still get stuck.



Details to my computer: MacBook Pro running macOS 10.12.6










share|improve this question




























    10















    I'm currently unable to run npm install in any project since today.
    I'm running node v8.2.1 & npm 5.3.0 (installed via nvm).



    When typing npm install it gets stuck on fetchMetadata everytime:
    ⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill pacote range manifest for longest@^1.0.1 fetched in 197ms



    I've tried switching back to npm 5.0.3 which worked flawless, but still get stuck.



    Details to my computer: MacBook Pro running macOS 10.12.6










    share|improve this question


























      10












      10








      10


      1






      I'm currently unable to run npm install in any project since today.
      I'm running node v8.2.1 & npm 5.3.0 (installed via nvm).



      When typing npm install it gets stuck on fetchMetadata everytime:
      ⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill pacote range manifest for longest@^1.0.1 fetched in 197ms



      I've tried switching back to npm 5.0.3 which worked flawless, but still get stuck.



      Details to my computer: MacBook Pro running macOS 10.12.6










      share|improve this question
















      I'm currently unable to run npm install in any project since today.
      I'm running node v8.2.1 & npm 5.3.0 (installed via nvm).



      When typing npm install it gets stuck on fetchMetadata everytime:
      ⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill pacote range manifest for longest@^1.0.1 fetched in 197ms



      I've tried switching back to npm 5.0.3 which worked flawless, but still get stuck.



      Details to my computer: MacBook Pro running macOS 10.12.6







      node.js npm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 21 '18 at 23:33









      Andru

      2,05411432




      2,05411432










      asked Aug 1 '17 at 8:48









      dschudschu

      2,28211835




      2,28211835






















          6 Answers
          6






          active

          oldest

          votes


















          6














          As a first thing, run npm install --verbose to see more!



          What happened in my case:



          In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore.
          Such lines look like



          "NAME_OF_PACKAGE": "git+ssh://git@github.com/SOME_USER/NAME_OF_PACKAGE.git",


          Remove the package, fix the name/location or change to the npm version of the package.




          Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something




          For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!






          share|improve this answer




















          • 1





            I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

            – MattyK14
            Jan 22 '18 at 20:54











          • Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

            – MattyK14
            Jan 23 '18 at 14:22











          • @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

            – Andru
            Jan 24 '18 at 13:56











          • no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

            – MattyK14
            Jan 24 '18 at 18:53


















          1














          I have experienced this and fixed it with rm -rf ~/.npm or npm cache clean.



          If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.






          share|improve this answer























          • Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

            – dschu
            Aug 1 '17 at 9:09







          • 1





            The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

            – Seth Holladay
            Aug 1 '17 at 20:39











          • This didn't help me... It then got stuck at the same message just with another package name

            – Andru
            Jan 17 '18 at 18:46


















          1














          The question is quite old but I've fallen into this scenario these days.



          I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.



          Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose and I discovered that all the connections to the URL registry.npmjs.org were done in https. This was the problem in my case.



          For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?



          At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?



          After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global everything has worked fine in a reasonable time for the installation packages process.



          Probably there is something more that I'm missing but in my case the plain http has resolved the problem.



          Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11






          share|improve this answer
































            0














            I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with







            then reinstall the package.






            share|improve this answer






























              0














              1. REASON: the reason for this is:
                the cli do not prompt: "Enter passphrase for /home/USERS/.ssh/id_rsa:"
                and I used to get the prompt correctly in npm@5, but update to npm@6, it occurs.

              2. SOLVE:
                # eval `ssh-agent`
                # ssh-add
                //automaticlly enter passphrase, without maunally operating.





              share|improve this answer






























                0














                In my case removing packge connected to the one that loads forever solve issue



                 "swagger-core-api": "apigee-127/swagger-core-api" //removing this 


                But the real reason of similar problems is project without full git data pushed to github(due to mess in .gitconfig). Then github clone copy files that not match one in repository (or Download ZIP).






                share|improve this answer
























                  Your Answer






                  StackExchange.ifUsing("editor", function ()
                  StackExchange.using("externalEditor", function ()
                  StackExchange.using("snippets", function ()
                  StackExchange.snippets.init();
                  );
                  );
                  , "code-snippets");

                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "1"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader:
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  ,
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45433130%2fnpm-install-gets-stuck-at-fetchmetadata%23new-answer', 'question_page');

                  );

                  Post as a guest















                  Required, but never shown

























                  6 Answers
                  6






                  active

                  oldest

                  votes








                  6 Answers
                  6






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  6














                  As a first thing, run npm install --verbose to see more!



                  What happened in my case:



                  In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore.
                  Such lines look like



                  "NAME_OF_PACKAGE": "git+ssh://git@github.com/SOME_USER/NAME_OF_PACKAGE.git",


                  Remove the package, fix the name/location or change to the npm version of the package.




                  Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something




                  For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!






                  share|improve this answer




















                  • 1





                    I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                    – MattyK14
                    Jan 22 '18 at 20:54











                  • Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                    – MattyK14
                    Jan 23 '18 at 14:22











                  • @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                    – Andru
                    Jan 24 '18 at 13:56











                  • no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                    – MattyK14
                    Jan 24 '18 at 18:53















                  6














                  As a first thing, run npm install --verbose to see more!



                  What happened in my case:



                  In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore.
                  Such lines look like



                  "NAME_OF_PACKAGE": "git+ssh://git@github.com/SOME_USER/NAME_OF_PACKAGE.git",


                  Remove the package, fix the name/location or change to the npm version of the package.




                  Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something




                  For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!






                  share|improve this answer




















                  • 1





                    I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                    – MattyK14
                    Jan 22 '18 at 20:54











                  • Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                    – MattyK14
                    Jan 23 '18 at 14:22











                  • @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                    – Andru
                    Jan 24 '18 at 13:56











                  • no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                    – MattyK14
                    Jan 24 '18 at 18:53













                  6












                  6








                  6







                  As a first thing, run npm install --verbose to see more!



                  What happened in my case:



                  In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore.
                  Such lines look like



                  "NAME_OF_PACKAGE": "git+ssh://git@github.com/SOME_USER/NAME_OF_PACKAGE.git",


                  Remove the package, fix the name/location or change to the npm version of the package.




                  Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something




                  For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!






                  share|improve this answer















                  As a first thing, run npm install --verbose to see more!



                  What happened in my case:



                  In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore.
                  Such lines look like



                  "NAME_OF_PACKAGE": "git+ssh://git@github.com/SOME_USER/NAME_OF_PACKAGE.git",


                  Remove the package, fix the name/location or change to the npm version of the package.




                  Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something




                  For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 18 '18 at 9:31

























                  answered Jan 17 '18 at 20:56









                  AndruAndru

                  2,05411432




                  2,05411432







                  • 1





                    I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                    – MattyK14
                    Jan 22 '18 at 20:54











                  • Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                    – MattyK14
                    Jan 23 '18 at 14:22











                  • @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                    – Andru
                    Jan 24 '18 at 13:56











                  • no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                    – MattyK14
                    Jan 24 '18 at 18:53












                  • 1





                    I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                    – MattyK14
                    Jan 22 '18 at 20:54











                  • Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                    – MattyK14
                    Jan 23 '18 at 14:22











                  • @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                    – Andru
                    Jan 24 '18 at 13:56











                  • no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                    – MattyK14
                    Jan 24 '18 at 18:53







                  1




                  1





                  I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                  – MattyK14
                  Jan 22 '18 at 20:54





                  I'm also seeing longest@^1.0.1 when it hangs, but all of my git packages are still existant.

                  – MattyK14
                  Jan 22 '18 at 20:54













                  Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                  – MattyK14
                  Jan 23 '18 at 14:22





                  Downgrading from npm@5.6.0 to npm@5.2.0 was my solution.

                  – MattyK14
                  Jan 23 '18 at 14:22













                  @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                  – Andru
                  Jan 24 '18 at 13:56





                  @MattyK14 Interesting. Do you know what the issue with the newer npm version is?

                  – Andru
                  Jan 24 '18 at 13:56













                  no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                  – MattyK14
                  Jan 24 '18 at 18:53





                  no idea, 5.6 was working fine for months and works with some projects and not others. It was hanging on a git+ package, but it would be a different one each time.

                  – MattyK14
                  Jan 24 '18 at 18:53













                  1














                  I have experienced this and fixed it with rm -rf ~/.npm or npm cache clean.



                  If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.






                  share|improve this answer























                  • Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                    – dschu
                    Aug 1 '17 at 9:09







                  • 1





                    The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                    – Seth Holladay
                    Aug 1 '17 at 20:39











                  • This didn't help me... It then got stuck at the same message just with another package name

                    – Andru
                    Jan 17 '18 at 18:46















                  1














                  I have experienced this and fixed it with rm -rf ~/.npm or npm cache clean.



                  If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.






                  share|improve this answer























                  • Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                    – dschu
                    Aug 1 '17 at 9:09







                  • 1





                    The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                    – Seth Holladay
                    Aug 1 '17 at 20:39











                  • This didn't help me... It then got stuck at the same message just with another package name

                    – Andru
                    Jan 17 '18 at 18:46













                  1












                  1








                  1







                  I have experienced this and fixed it with rm -rf ~/.npm or npm cache clean.



                  If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.






                  share|improve this answer













                  I have experienced this and fixed it with rm -rf ~/.npm or npm cache clean.



                  If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 1 '17 at 8:55









                  Seth HolladaySeth Holladay

                  3,3031228




                  3,3031228












                  • Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                    – dschu
                    Aug 1 '17 at 9:09







                  • 1





                    The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                    – Seth Holladay
                    Aug 1 '17 at 20:39











                  • This didn't help me... It then got stuck at the same message just with another package name

                    – Andru
                    Jan 17 '18 at 18:46

















                  • Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                    – dschu
                    Aug 1 '17 at 9:09







                  • 1





                    The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                    – Seth Holladay
                    Aug 1 '17 at 20:39











                  • This didn't help me... It then got stuck at the same message just with another package name

                    – Andru
                    Jan 17 '18 at 18:46
















                  Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                  – dschu
                  Aug 1 '17 at 9:09






                  Thanks, I've tried that and it helped! I could run npm install in 2 out of 3 projects..In the 3rd however, I saw the message Enter passphrase for a fraction of a second....It was waiting for my ssh pass (private repo dependency)..lol! npm should show this in front instead of hidding it. I entered the password on the "stuck" npm install process, and it continued the installation.

                  – dschu
                  Aug 1 '17 at 9:09





                  1




                  1





                  The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                  – Seth Holladay
                  Aug 1 '17 at 20:39





                  The reason that happened is because Enter passphrase is coming from git, which is a different program altogether. I'm not sure if there is a clean way for npm to know when that is happening. It would be nice.

                  – Seth Holladay
                  Aug 1 '17 at 20:39













                  This didn't help me... It then got stuck at the same message just with another package name

                  – Andru
                  Jan 17 '18 at 18:46





                  This didn't help me... It then got stuck at the same message just with another package name

                  – Andru
                  Jan 17 '18 at 18:46











                  1














                  The question is quite old but I've fallen into this scenario these days.



                  I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.



                  Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose and I discovered that all the connections to the URL registry.npmjs.org were done in https. This was the problem in my case.



                  For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?



                  At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?



                  After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global everything has worked fine in a reasonable time for the installation packages process.



                  Probably there is something more that I'm missing but in my case the plain http has resolved the problem.



                  Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11






                  share|improve this answer





























                    1














                    The question is quite old but I've fallen into this scenario these days.



                    I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.



                    Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose and I discovered that all the connections to the URL registry.npmjs.org were done in https. This was the problem in my case.



                    For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?



                    At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?



                    After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global everything has worked fine in a reasonable time for the installation packages process.



                    Probably there is something more that I'm missing but in my case the plain http has resolved the problem.



                    Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11






                    share|improve this answer



























                      1












                      1








                      1







                      The question is quite old but I've fallen into this scenario these days.



                      I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.



                      Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose and I discovered that all the connections to the URL registry.npmjs.org were done in https. This was the problem in my case.



                      For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?



                      At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?



                      After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global everything has worked fine in a reasonable time for the installation packages process.



                      Probably there is something more that I'm missing but in my case the plain http has resolved the problem.



                      Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11






                      share|improve this answer















                      The question is quite old but I've fallen into this scenario these days.



                      I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.



                      Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose and I discovered that all the connections to the URL registry.npmjs.org were done in https. This was the problem in my case.



                      For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?



                      At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?



                      After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global everything has worked fine in a reasonable time for the installation packages process.



                      Probably there is something more that I'm missing but in my case the plain http has resolved the problem.



                      Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Oct 23 '18 at 18:33









                      Acapulco

                      1,63662934




                      1,63662934










                      answered Oct 23 '18 at 17:31









                      CptUnluckyCptUnlucky

                      111




                      111





















                          0














                          I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with







                          then reinstall the package.






                          share|improve this answer



























                            0














                            I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with







                            then reinstall the package.






                            share|improve this answer

























                              0












                              0








                              0







                              I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with







                              then reinstall the package.






                              share|improve this answer













                              I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with







                              then reinstall the package.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 5 '18 at 7:34









                              LekensLekens

                              633518




                              633518





















                                  0














                                  1. REASON: the reason for this is:
                                    the cli do not prompt: "Enter passphrase for /home/USERS/.ssh/id_rsa:"
                                    and I used to get the prompt correctly in npm@5, but update to npm@6, it occurs.

                                  2. SOLVE:
                                    # eval `ssh-agent`
                                    # ssh-add
                                    //automaticlly enter passphrase, without maunally operating.





                                  share|improve this answer



























                                    0














                                    1. REASON: the reason for this is:
                                      the cli do not prompt: "Enter passphrase for /home/USERS/.ssh/id_rsa:"
                                      and I used to get the prompt correctly in npm@5, but update to npm@6, it occurs.

                                    2. SOLVE:
                                      # eval `ssh-agent`
                                      # ssh-add
                                      //automaticlly enter passphrase, without maunally operating.





                                    share|improve this answer

























                                      0












                                      0








                                      0







                                      1. REASON: the reason for this is:
                                        the cli do not prompt: "Enter passphrase for /home/USERS/.ssh/id_rsa:"
                                        and I used to get the prompt correctly in npm@5, but update to npm@6, it occurs.

                                      2. SOLVE:
                                        # eval `ssh-agent`
                                        # ssh-add
                                        //automaticlly enter passphrase, without maunally operating.





                                      share|improve this answer













                                      1. REASON: the reason for this is:
                                        the cli do not prompt: "Enter passphrase for /home/USERS/.ssh/id_rsa:"
                                        and I used to get the prompt correctly in npm@5, but update to npm@6, it occurs.

                                      2. SOLVE:
                                        # eval `ssh-agent`
                                        # ssh-add
                                        //automaticlly enter passphrase, without maunally operating.






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Aug 27 '18 at 3:28









                                      Qin BoQin Bo

                                      11




                                      11





















                                          0














                                          In my case removing packge connected to the one that loads forever solve issue



                                           "swagger-core-api": "apigee-127/swagger-core-api" //removing this 


                                          But the real reason of similar problems is project without full git data pushed to github(due to mess in .gitconfig). Then github clone copy files that not match one in repository (or Download ZIP).






                                          share|improve this answer





























                                            0














                                            In my case removing packge connected to the one that loads forever solve issue



                                             "swagger-core-api": "apigee-127/swagger-core-api" //removing this 


                                            But the real reason of similar problems is project without full git data pushed to github(due to mess in .gitconfig). Then github clone copy files that not match one in repository (or Download ZIP).






                                            share|improve this answer



























                                              0












                                              0








                                              0







                                              In my case removing packge connected to the one that loads forever solve issue



                                               "swagger-core-api": "apigee-127/swagger-core-api" //removing this 


                                              But the real reason of similar problems is project without full git data pushed to github(due to mess in .gitconfig). Then github clone copy files that not match one in repository (or Download ZIP).






                                              share|improve this answer















                                              In my case removing packge connected to the one that loads forever solve issue



                                               "swagger-core-api": "apigee-127/swagger-core-api" //removing this 


                                              But the real reason of similar problems is project without full git data pushed to github(due to mess in .gitconfig). Then github clone copy files that not match one in repository (or Download ZIP).







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Nov 13 '18 at 16:30

























                                              answered Nov 13 '18 at 11:35









                                              SkorpENSkorpEN

                                              420517




                                              420517



























                                                  draft saved

                                                  draft discarded
















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45433130%2fnpm-install-gets-stuck-at-fetchmetadata%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Top Tejano songwriter Luis Silva dead of heart attack at 64

                                                  ReactJS Fetched API data displays live - need Data displayed static

                                                  Evgeni Malkin