Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When I run npm install
in some repository, like https://github.com/mozilla/pdf.js, it gets stuck at the step: 'idealTree:lib: sill idealTree buildDeps'.
Other things like npm -g install
don't work either.
Below is the verbose output and debug log attached.
npm-verbose.txt
2022-01-21T23_07_33_102Z-debug-0.log
Expected Behavior
It should install the neccesary packages
Steps To Reproduce
- run
npm install -g gulp-cli
(or any other package presumably)
Environment
- npm: 8.3.2
- Node.js: v17.3.0
- OS Name: Arch Linux
- System Model Name: Hp Zbook studio G5
- npm config:
prefix = "/usr"
; node bin location = /usr/bin/node
; cwd = /home/friso
; HOME = /home/friso
; Run `npm config ls -l` to show all defaults.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
MatiasDuhalde commentedon Feb 14, 2022
I have the same issue, when trying to install a package globally or locally. I am also running Arch Linux. The command eventually fails with ETIMEDOUT as follows:
The log suggests a problem trying to access
https://registry.npmjs.org/npm/-/npm-8.3.1.tgz
, but i have no problems accessing the URL from Firefox, or viacurl
. Also, I am not connected to a proxy, and I haven't changed npm's proxy-related config from its default value.EDIT: I started tinkering with
nvm
and found out the following:node v17.0.0
withnpm v8.1.0
andnode v17.5.0
withnpm v8.4.1
, and neither worked.node v16.14.0 (npm v8.3.1)
, and I had no problems runningnpm install
So, rolling back to v16 might work as a temporary solution, while the issue remains unresolved with node v17.
Environment
nlf commentedon Mar 8, 2022
i think we need more information to reproduce this one. first off, can you give things a try with npm 8.5.3 and see if you still have problems?
if you do, can you share the
package.json
you're using? also, can you attempt to remove thenode_modules
andpackage-lock.json
manually and try again?nlf commentedon Mar 8, 2022
@MatiasDuhalde your issue looks to be a problem with ipv6 as you have a timeout occurring during the socket connection. i've seen this happen myself on occasion and have raised the issue internally for investigation with the registry team. can you try running
and see if you get a response?
MatiasDuhalde commentedon Mar 8, 2022
Hey @nlf ! Thanks for the reply!
Using npm
8.5.3
and node17.6.0
, I generated a newpackage.json
file withnpm init -y
, and tried installinguuid
. I got the same behavior as last time, command failed after some time, with the following error:The complete log:
I ran the command you suggested in Arch Linux, but got no response. I tried same command in Debian in the same network, and got a
json
result immediately.nlf commentedon Mar 8, 2022
this is an underlying problem in your arch linux installation it seems. if the above
curl
command works, then npm should also work, but right now due to the problems with your ipv6 network you're getting the timeout instead. unfortunately not much we can do to help with that one, it'll be on you to figure out how to get your ipv6 stack working correctly.fwsmit commentedon Mar 12, 2022
Not sure if relevent, but I gave the curl command some time to complete, but it didn't give any results. I don't have ipv6, though.
The issue I had seems to be resolved, though. npm install works again! I'll close this issue
sanzhardanybayev commentedon Apr 29, 2022
In my case the problem was in my server's DNS. Once I changed it to Google's installation went fine.
Arturexe commentedon May 15, 2022
I'm on
node 18
withnpm 8.6
and this is still happening to me out of nowhere. This morning I've set up a new project and now suddenly I can't usenpm
anymore.MatiasDuhalde commentedon May 17, 2022
I had this problem some time ago, and just as @nlf suggested here #4309 (comment), it was related to my IPv6 stack configuration, and the problem was not limited to the npm registry, but also extended to the communication with other services that use IPv6, as I could diagnose later. Also, in my personal case, the problem was not exactly my OS, but my local network router. After tinkering some time with the router configuration, I could make it work. Unfortunately I can't give more insight on how, since I can't recall the settings I modified, and I'm not very skilled in networking.
marianoarga commentedon Jun 8, 2022
In my case being behind a VPN was causing this issue, I disconnected and it ran just fine
38 remaining items