Unable to run in Mac os
Closed this issue · 1 comments
sudo curl -sL https://raw.githubusercontent.com/nolanlawson/local-npm-launch-agent/master/script.py | python -
npm install -g local-npm pm2 npmrc
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://127.0.0.1:5080/local-npm failed, reason: connect ECONNREFUSED 127.0.0.1:5080
npm ERR! at ClientRequest. (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:513:28)
npm ERR! at Socket.socketErrorListener (node:_http_client:494:9)
npm ERR! at Socket.emit (node:events:525:35)
npm ERR! at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! FetchError: request to http://127.0.0.1:5080/local-npm failed, reason: connect ECONNREFUSED 127.0.0.1:5080
npm ERR! at ClientRequest. (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:513:28)
npm ERR! at Socket.socketErrorListener (node:_http_client:494:9)
npm ERR! at Socket.emit (node:events:525:35)
npm ERR! at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 5080,
npm ERR! type: 'system',
npm ERR! requiredBy: '.'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Shymun/.npm/_logs/2023-03-27T06_14_24_754Z-debug-0.log
launchctl load -w ~/Library/LaunchAgents/com.nolanlawson.localnpm.plist
npmrc -c local
sh: npmrc: command not found
Done! You now have local-npm running at 127.0.0.1:5080
You also have an npmrc called "local" configured to point to it.
All offline data is stored in ~/.local-npm
If you want to switch back to normal npm, run:
npmrc default
If you want to see replication progress, run:
pm2 logs all
If you want to uninstall, run:
launchctl unload ~/Library/LaunchAgents/com.nolanlawson.localnpm.plist
Got the issue, it was due to multiple registries registered