pull down to refresh

omitted @ root foldername % npm install -g pnpm
npm error code ECONNREFUSED
npm error errno ECONNREFUSED
npm error FetchError: request to http://localhost:8883/pnpm failed, reason: 
npm error     at ClientRequest.<anonymous> (/Users/omitted/.nvm/versions/node/v20.18.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm error     at ClientRequest.emit (node:events:519:28)
npm error     at emitErrorEvent (node:_http_client:101:11)
npm error     at _destroy (node:_http_client:884:9)
npm error     at onSocketNT (node:_http_client:904:5)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm error   code: 'ECONNREFUSED',
npm error   errno: 'ECONNREFUSED',
npm error   type: 'system',
npm error   requiredBy: '.'
npm error }
npm error
npm error If you are behind a proxy, please make sure that the
npm error 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: /Users/omitted/.npm/_logs/2024-10-24T09_50_41_257Z-debug-0.log

Getting this error when trying to install pnpm on a local folder. Not sure whether there's any misconfiguration from other scripts on my machine, as is making the request on http://localhost:8883/pnpm

Any help welcome

Do you have a .npmrc file somewhere like your home directory? If so, check it for entries with localhost. Looks like a misconfiguration

reply

Yes found! It contains:

registry=http://localhost:8883

What should I change it with?

reply

Just delete that entry. You want to pull from the default registry most likely

reply

🤙 it worked. Thanks

reply

You’re welcome!

reply