Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 491 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
npm gets stuck on fetchMetadata -> network

#1
My npm is getting stuck a lot, whether its npm install from `package.json` or individual packages.

Right now, I'm not even able to `sudo npm install node-inspector -g`

I'm using `node 6.2.1`, `npm 3.9.5` on `ubuntu 16.04`

`npm cache clear` didn't help.
The installation takes hours or fails.
Reply

#2
try [yarn][1] installer instead of npm:

sudo npm install -g yarn
yarn install

I found it much more resilient to such problems.

[1]:

[To see links please register here]

Reply

#3
Having same problem. Fixed it by switching to correct version of node required by the project.

My project needed node ```>=v4.3 and <=v5.```

1) Check node version being used by ``nvm ls``

2) Use ``nvm use [version]`` or else install the specific version. if you don't have.
Reply

#4
I got the same issue. First of all try to run `npm install` with `-verbose` flag. That can help you identify your problem.

That command told me that I had some problem with tunneling socket:

> tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL 23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:

After that I googled the error and found [thread on github](

[To see links please register here]

) about that problem. The problem was in proxy: previously I set up `HTTP_PROXY` environment variable and after removing then environment variable `npm install` completed without any error.
Reply

#5
For me it was double temp directories in Windows.

Open a command prompt and type:

echo %TEMP%

You should receive path to a single directory. If you receive multiple directories (I received C:\Users\<user>\AppData\Local\Temp;C:\xampp\php\) this might be the problem. You can fix it using this command:

SET TEMP="<correct path to temporary directory>"

where `<correct path to temporary directory>` might be the first path (before semicolon, that means `C:\Users\<user>\AppData\Local\Temp` in my case).
Reply

#6
Check if there any issues with proxies if you using any.
You can try also to set npm's endpoint manually:

npm config set registry="http://registry.npmjs.org"
Reply

#7
I had this same problem, with several different installs hanging on `fetchMetaData`, including the install of `yarn` mentioned above. I am on a `Mac` and solved it by updating `npm` as follows:

npm install npm@latest -g

So if you are encountering this issue on `Mac`, then try updating and see if it solves your problem.
Reply

#8
There are a lot of different things that can cause this issue.

I had tried a lot of things, including most of the answers posted here, but no luck.

For some weird reason, this was my ISP's issue. It worked fine when I tried on a different ISP.
Reply

#9
For the major chunk of the people, the issue could be related to proxy settings and can be solved by the above-mentioned solutions.

For me, the issue was something else. I have private repository dependencies which are hosted at Bitbucket and are resolved through "git+ssh://[email protected]/" which intern uses SSH to retrieve the repo.

SSH by default prefers IPv6 if DNS retrieves AAAA record and if the host has one. Since Bitbucket does have AAAA record, SSH is done over IPv6. But my ISP doesn't support IPv6 (You could check if your ISP support's IPv6 by taking a test in

[To see links please register here]

).

To solve this, you could force SSH client to use IPv4 instead of IPv6.

Set `AddressFamily inet` in `/etc/ssh/ssh_config` and restart SSH client.

On Ubuntu to restart SSH client use `sudo service ssh restart`
Reply

#10
You'll need to clear your https proxy settings:

npm config rm proxy
npm config rm https-proxy
Reply



Forum Jump:


Users browsing this thread:
3 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through