--- lib/node_modules/npm/lib/config/defaults.js.orig 1985-10-26 08:15:00 UTC +++ lib/node_modules/npm/lib/config/defaults.js @@ -372,26 +372,7 @@ exports.types = { } function getLocalAddresses () { - var interfaces - // #8094: some environments require elevated permissions to enumerate - // interfaces, and synchronously throw EPERM when run without - // elevated privileges - try { - interfaces = os.networkInterfaces() - } catch (e) { - interfaces = {} - } - - return Object.keys(interfaces).map(function (nic) { - return interfaces[nic].filter(function (addr) { - return addr.family === 'IPv4' - }) - .map(function (addr) { - return addr.address - }) - }).reduce(function (curr, next) { - return curr.concat(next) - }, []).concat(undefined) + return [ '127.0.0.1', undefined ] } exports.shorthands = {