I have read numerous posting on this. I don't see an answer. I'm trying to install this on my Ubuntu via the command sudo npm install -g truffle
My Ubuntu is installed on Windows. It asks if there is some proxy. I tried the commands
npm set proxy null npm set https-proxy null
How does one set the ERR proxy config correctly? Why isn't all this stuff done automatically?
npm ERR! code ECONNREFUSED npm ERR! syscall connect npm ERR! errno ECONNREFUSED npm ERR! FetchError: request to https://registry.npmjs.org/truffle failed, reason: connect ECONNREFUSED 2606:4700::6810:1a22:443 npm ERR! at ClientRequest. (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14) npm ERR! at ClientRequest.emit (node:events:517:28) npm ERR! at _destroy (node:_http_client:882:13) npm ERR! at onSocketNT (node:_http_client:902:5) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21) npm ERR! FetchError: request to https://registry.npmjs.org/truffle failed, reason: connect ECONNREFUSED 2606:4700::6810:1a22:443 npm ERR! at ClientRequest. (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14) npm ERR! at ClientRequest.emit (node:events:517:28) npm ERR! at _destroy (node:_http_client:882:13) npm ERR! at onSocketNT (node:_http_client:902:5) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { npm ERR! code: 'ECONNREFUSED', npm ERR! errno: 'ECONNREFUSED', npm ERR! syscall: 'connect', npm ERR! address: '2606:4700::6810:1a22', npm ERR! port: 443, 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'
Kinda of silly. I turned off my VPN and it worked.