NPM does not continue package installation

Asked

Viewed 3,789 times

4

I’m trying to install a simple package with NPM, but the installation doesn’t start, always stops at the same place.

C:\Users\Gabriel>npm install -g luaparse --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   '-g',
npm verb cli   'luaparse',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb install initial load of C:\Users\Gabriel\AppData\Roaming\npm\package.json
npm verb readDependencies loading dependencies from C:\Users\Gabriel\AppData\Roaming\npm\package.json
npm verb cache add spec luaparse
npm verb addNamed "*" is a valid semver range for luaparse
npm verb addNameRange registry:https://registry.npmjs.org/luaparse not in flight; fetching
npm verb request uri https://registry.npmjs.org/luaparse
npm verb request no auth needed
npm info attempt registry request try #1 at 16:34:25
npm verb request id 197979e946371ad9
npm http request GET https://registry.npmjs.org/luaparse
-

I’ve tried other packages, and the same thing happens. Before I tried with version 4.6 and 4.5 of Node.js, but I think the problem is in my computer, if you can give a light, I thank you.

Edit: When I was having this problem, I could not drip on any ip/address, today I managed to drip, and still can not download anything.

Edit: I installed Node.js 6.19, and it has a new line when I try the same command:

[..................] - normalizeTree: http request GET http://registry.npmjs.org/luaparse

That’s where it stops.

5 answers

3

  • Disable the firewall of if router
  • npm set registry https://registry.npmjs.org/

If it doesn’t work, use a mirror pro npm:

npm config set registry http://skimdb.npmjs.com/registry

Then use the original again:

npm config set registry http://registry.npmjs.org

Edit: another possible solution would be to specify the Registry when installing the package.

First of all, clear npm cache:

npm cache clean

And then try:

npm install luaparse --registry http://registry.npmjs.org/

Edit2: knowing that you are using DMZ, first of all try to disable DMZ (reboot required)

Only if you cannot disable, as the DMZ is encapsulating the DNS, try setting the DNS server to automatic:

netsh interface ip set dns "Local Area Connection" dhcp

Take the ip of your machine using ipconfig then seven it as DMZ server (is in NAT/DMZ/Advanced settings, depending on your router)

References:

https://docs.npmjs.com/misc/registry http://www.projetoderedes.com.br/artigos/artigo_redes_de_perimetro.php http://www.explorando.com.br/dmz-host/

  • It still doesn’t work because I can’t drip in npmjs.org.

  • @Gabrielsales You can’t drip because the router’s firewall is on, disable it. http://pt.wikihow.com/Desativar-o-Firewall-do-Roteador

  • My ip is like DMZ on the router. I tried to "drip' any address through my phone, and it still didn’t work. Strange that a while ago, I could drip any site

  • @Gabrielsales Check out this tutorial https://www.youtube.com/watch?v=EHT8bFZCs-w

  • Ola Renan, well, as I said in another comment here, my ip is already as DMZ on the router. My connection is via radio, so I don’t have access to "modem".

  • @Gabrielsales Have you disabled the router firewall? (please confirm for me) , after that try to disable the DMZ, the DMZ is encapsulating the DNS, so you are not getting to drip certain websites. Check out my edited reply.

  • Renan, there is no option to disable the entire firewall of my router(Multilaser re160), just enabling the same DMZ

  • 1

    @Gabrielsales As you are not able to disable your router’s firewall or disable DMZ, I recommend you seek technical assistance with your internet radio provider, because there is no way I know how the DMZ is configured in your network, I don’t know if your provider allows you to disable it, and I also don’t know if your provider allows you to change the DNS. We found the cause of the problem, but I can’t go beyond this.

  • Renan, I have to disable the DMZ yes, but it remains the same. There is only no option to disable the same Firewall.

Show 4 more comments

0

I recommend you lower the NVM, which is a version control to use more than one version of Node at the same time. Installation instructions are on README of the project.

After intalar install the desired version of Node:

nvm install v4

and after that enable its use:

nvm use v4

Edited:

Try to enable some proxy for npm updates, you can do this as follows for one package only:

npm --proxy http://proxy-server:8080/ install {package-name}

Or you can set the global proxy setting with:

npm config set proxy http://proxy_host:port

Related question: Is there a way to make npm install (the command) to work Behind proxy?

Here you can track a related issue about firewall blocking and bypassing it successfully. And here a question that was migrated from stackoverflow to superuser about similar problems that used the suggested solution.

The only question left is to have a connection to use as a proxy.

  • I installed nvm, tried to install with "nvm install v4", but it happens the same as with NPM, spends a lot of time and does not install (more than the download time in Node.js and npm).

  • try to start the terminal as administrator, for this: right-click the cmd and then open as administrator.

  • It still doesn’t work

  • I don’t have a connection to use as a proxy

  • There are many proxys open on the internet, the issue would be traffic safety, but anyway, it is a possible solution.

0

This is Gabriel, here are some items for you to check:

  1. GIT is installed?
  2. Can you clone into some external repository (git clone https://github.com/Bigous/ng2-highcharts.git for example)?
  3. Since you have already said that there is no proxy, are the http_proxy and/or https_proxy environment variables empty? (check with set command without parameters)?
  4. You have write permission in the directory "C: Users Gabriel Appdata Roaming npm"?

If in all these questions you answer yes, try to clear the npm cache, sometimes it gets corrupted and causes strange problems:

npm cache clean
  • Hello @Bigous, responding: 1-Yes, 2-Yes, 3-There are no, 4-yes. And I’ve tried to give clean. Thanks anyway.

  • This is @Gabrielsales, can you drip 52.27.70.152 ? if yes, you have a DNS problem - to resolve you can change your windows settings to google DNS for example (8.8.8.8 and 8.8.4.4)

  • And there. Well, I use these dns as a pattern, and I can drip yes.

  • The DNS is configured on the router or on your machine? pq if you have it on the router, it might be caching, then setting on the machine you solve. If on the machine, try giving a ipconfig /flushdns to see if it redos the local cache and resolves, but if it is leaking the problem is dns, sure, because the IP above is from npmjs.org

  • The DNS was on the router, I put it on the computer, I flushdns, but it’s still the same, thanks for trying

0

Since Voce did not use sudo, I suppose it is using npm by windows. If it’s in windows, install git bash and right after the installation right-click git bash -> run as administrator, and run the command again.

-1

I solved this problem deleting from directory . npm from the root of my computer. Maybe it only works on macOS and Linux. In the window I won’t know how to fix it. And after I did that I gave an "npm install" on the project, and it worked!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.