On Cloud9, I’m running npm install through2-map and getting a ECONNREFUSED error. I’ve tried a number of things based on google searches but no success. The error:
witcradg:~/workspace $ npm install through2-map
npm ERR! Linux 4.2.0-c9
npm ERR! argv “/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node” “/home/ubuntu/.nvm/versions/node/v4.4.5/bin/npm” “install” "through2-map"
npm ERR! node v4.4.5
npm ERR! npm v3.10.5
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect
npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR! at Object.exports._errnoException (util.js:870:11)
npm ERR! at exports._exceptionWithHostPort (util.js:893:20)
npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
npm ERR! { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR! code: ‘ECONNREFUSED’,
npm ERR! errno: ‘ECONNREFUSED’,
npm ERR! syscall: ‘connect’,
npm ERR! address: ‘127.0.0.1’,
npm ERR! port: 15443 }
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! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/npm-debug.log
Things I’ve tried:
npm install -g through2-map
sudo npm install through2-map
npm clear cache
I’ve made sure I don’t have node running
ps -ef | grep node
I get an installation when I do sudo npm install -g through2-map but the require statement cannot find it:
witcradg:~/workspace $ learnyounode run program.js
module.js:327
throw err;
^
Error: Cannot find module 'through2-map’
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/ubuntu/workspace/program.js:2:11)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
✗ Error connecting to http://localhost:21110:
connect ECONNREFUSED 127.0.0.1:21110
witcradg:~/workspace $ head program.js
var http = require(“http”);
var map = require(“through2-map”);