Sorry for the weird issue, but I don't really know where to start debugging. My build fails on GitLab (no sandboxing) with a really strange error. Builds on my laptop NixOS (with or without sandboxing) are fine. Building on my laptop using the local GitLab runner does fail.
npm WARN kevincox-web-compiler@0.0.0 No repository field.
npm WARN kevincox-web-compiler@0.0.0 No license field.
npm verb type system
npm verb stack FetchError: request to http://localhost:46645/abab failed, reason: getaddrinfo ENOTFOUND localhost
npm verb stack at ClientRequest.<anonymous> (/nix/store/nm15xz8bigq33d3x8r8lfrdlnvspmjrm-nodejs-14.15.4/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
npm verb stack at ClientRequest.emit (events.js:315:20)
npm verb stack at Socket.socketErrorListener (_http_client.js:469:9)
npm verb stack at Socket.emit (events.js:315:20)
npm verb stack at emitErrorNT (internal/streams/destroy.js:106:8)
npm verb stack at emitErrorCloseNT (internal/streams/destroy.js:74:3)
npm verb stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm verb cwd /tmp/nix-build-kevincox-web-compiler-0.0.0.drv-0/kevincox-web-compiler
npm verb Linux 4.19.78-coreos
npm verb argv "/nix/store/nm15xz8bigq33d3x8r8lfrdlnvspmjrm-nodejs-14.15.4/bin/node" "/nix/store/nm15xz8bigq33d3x8r8lfrdlnvspmjrm-nodejs-14.15.4/bin/npm" "install" "--loglevel" "verbose"
npm verb node v14.15.4
npm verb npm v6.14.10
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://localhost:46645/abab failed, reason: getaddrinfo ENOTFOUND localhost
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm verb exit [ 1, true ]https://gitlab.com/kevincox/nix-ci/-/blob/v1/default.nix
npm timing npm Completed in 5303ms
There is a localhost entry in the hosts file for both IPv4 and IPv6.
I'm opening this bug to help anyone else seeing a similar problem and ideally collect debugging tips and information. Feel free to close if you consider it off-topic.
One other question: Do you think it would be possible to use a loopback IP directly instead of localhost? It would remove a dependency in the stack even if I should get a proper environment set up.
Sorry for the weird issue, but I don't really know where to start debugging. My build fails on GitLab (no sandboxing) with a really strange error. Builds on my laptop NixOS (with or without sandboxing) are fine. Building on my laptop using the local GitLab runner does fail.
There is a localhost entry in the hosts file for both IPv4 and IPv6.
Links:
This seems to be stemming from the custom image that the build runs in but I haven't been able to identify the cause yet. https://gitlab.com/kevincox/nix-ci/-/blob/v1/default.nix
I'm opening this bug to help anyone else seeing a similar problem and ideally collect debugging tips and information. Feel free to close if you consider it off-topic.
One other question: Do you think it would be possible to use a loopback IP directly instead of localhost? It would remove a dependency in the stack even if I should get a proper environment set up.