New mac user here. I'm trying to create a composer project in phpstorm (laravel/laravel) but every time I run npm install
the process gets stuck at:
npm timing idealTree:userRequests Completed in 0ms
⸨⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠸ idealTree:stuttard_staging: sill idealTree buildDeps
Full error report (after ~10 minutes freeze):
npm timing idealTree:buildDeps Completed in 1181143ms
npm timing idealTree:fixDepFlags Completed in 1ms
npm timing idealTree Completed in 1181150ms
npm timing command:i Completed in 1181156ms
npm verb type system
npm verb stack FetchError: request to http://registry.npmjs.org/axios failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:80
npm verb stack at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:110:14)
npm verb stack at ClientRequest.emit (node:events:390:28)
npm verb stack at Socket.socketErrorListener (node:_http_client:447:9)
npm verb stack at Socket.emit (node:events:402:35)
npm verb stack at emitErrorNT (node:internal/streams/destroy:164:8)
npm verb stack at emitErrorCloseNT (node:internal/streams/destroy:129:3)
npm verb stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm verb cwd /Users/artur/PhpstormProjects/stuttard_staging
npm verb Darwin 20.6.0
npm verb argv "/opt/homebrew/Cellar/node/17.2.0/bin/node" "/opt/homebrew/bin/npm" "i" "--verbose"
npm verb node v17.2.0
npm verb npm v8.1.4
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/axios failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:80
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm verb exit 1
npm timing npm Completed in 1181269ms
npm verb unfinished npm timer reify 1638537601466
npm verb unfinished npm timer reify:loadTrees 1638537601470
npm verb code 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/artur/.npm/_logs/2021-12-03T13_39_42_628Z-debug.log
This issue seems to exist since years with node versions 14+
. I'm using node 17.2
with npm 8.1.4
and still seem to get it. Some threads tell to delete package-lock.json
folder which I don't have.
I've tried configuring the registry:
npm config set registry http://registry.npmjs.org/
or clear the cache:
npm cache clear --force
but nothing seems to help. I've tried all of the solutions provided in these threads, without success:
npm install hangs on idealTree
Could this be an issue with my network configuration? As I said, I'm mac noob. Any way to check?
Edit:
I was able to get it to work by downgrading to ancient software:
node 14.17.4
npm 6.14.14
This is just a temporary fix and I would love to know How to make it work with current software versions.