Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download .... getaddrinfo ENOTFOUND github.com github.com:443 #142

Open
srghma opened this issue Jul 1, 2018 · 4 comments
Open

Comments

@srghma
Copy link
Contributor

srghma commented Jul 1, 2018

From this issue #141

$ nix repl
f = /home/srghma/projects/my-create-react-app/nix/nodePackages/node-sass/4.9.0.nix
:l <nixpkgs>
nixLib = import /home/srghma/projects/my-create-react-app/nix { inherit pkgs nodejs; }
nixLib.callPackage f {}

....


Checking dependencies of node-sass
  async-foreach@^0.1.3 -> OK (found version 0.1.3)
  chalk@^1.1.1 -> OK (found version 1.1.3)
  cross-spawn@^3.0.0 -> OK (found version 3.0.1)
  gaze@^1.0.0 -> OK (found version 1.1.3)
  get-stdin@^4.0.1 -> OK (found version 4.0.1)
  glob@^7.0.3 -> OK (found version 7.1.2)
  in-publish@^2.0.0 -> OK (found version 2.0.0)
  lodash.assign@^4.2.0 -> OK (found version 4.2.0)
  lodash.clonedeep@^4.3.2 -> OK (found version 4.5.0)
  lodash.mergewith@^4.6.0 -> OK (found version 4.6.1)
  meow@^3.7.0 -> OK (found version 3.7.0)
  mkdirp@^0.5.1 -> OK (found version 0.5.1)
  nan@^2.10.0 -> OK (found version 2.10.0)
  node-gyp@^3.3.1 -> OK (found version 3.7.0)
  npmlog@^4.0.0 -> OK (found version 4.1.2)
  request@~2.79.0 -> OK (found version 2.79.0)
  sass-graph@^2.2.4 -> OK (found version 2.2.4)
  stdout-stream@^1.4.0 -> OK (found version 1.4.0)
  true-case-path@^1.0.2 -> OK (found version 1.0.2)
Running 'install' defined in package.json
+ node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/linux-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/linux-x64-48_binding.node":

getaddrinfo ENOTFOUND github.com github.com:443

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080
Running 'postinstall' defined in package.json
+ node scripts/build.js
Building: /nix/store/n05xf7py24n48q36azbwz1gim0sayram-nodejs-6.14.3/bin/node /nix/store/a3d5f158c89v97fq1gn40x677f9pkh8c-node-gyp-3.7.0-nodejs-6.14.3/lib/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/nix/store/n05xf7py24n48q36azbwz1gim0sayram-nodejs-6.14.3/bin/node',
gyp verb cli   '/nix/store/a3d5f158c89v97fq1gn40x677f9pkh8c-node-gyp-3.7.0-nodejs-6.14.3/lib/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /nix/store/2k0ap4hvl25rxlwhhva9ydhcsx8z3p0k-python-2.7.15/bin/python2
gyp verb check python version `/nix/store/2k0ap4hvl25rxlwhhva9ydhcsx8z3p0k-python-2.7.15/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.15\n"
gyp verb get node dir no --target version specified, falling back to host node version: 6.14.3
gyp verb command install [ '6.14.3' ]
gyp verb install input version string "6.14.3"
gyp verb install installing version: 6.14.3
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 6.14.3
gyp verb ensuring nodedir is created /homeless-shelter/.node-gyp/6.14.3
gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/homeless-shelter/.node-gyp/6.14.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/build/.node-gyp"
gyp verb command install [ '--node_gyp_internal_noretry', '6.14.3' ]
gyp verb install input version string "6.14.3"
gyp verb install installing version: 6.14.3
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 6.14.3
gyp verb ensuring nodedir is created /build/.node-gyp/6.14.3
gyp verb created nodedir /build/.node-gyp
gyp http GET https://nodejs.org/download/release/v6.14.3/node-v6.14.3-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '6.14.3' ]
gyp verb remove using node-gyp dir: /build/.node-gyp
gyp verb remove removing target version: 6.14.3
gyp verb remove removing development files for version: 6.14.3
gyp WARN install got an error, rolling back install
gyp verb command remove [ '6.14.3' ]
gyp verb remove using node-gyp dir: /build/.node-gyp
gyp verb remove removing target version: 6.14.3
gyp verb remove removing development files for version: 6.14.3
gyp ERR! configure error
gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad
gyp ERR! stack network settings.
gyp ERR! stack     at Request.<anonymous> (/nix/store/a3d5f158c89v97fq1gn40x677f9pkh8c-node-gyp-3.7.0-nodejs-6.14.3/lib/node_modules/node-gyp/lib/install.js:197:21)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! stack     at Request.emit (events.js:188:7)
gyp ERR! stack     at Request.onRequestError (/nix/store/z1cmx83b68ybp0syaq2azwzdy9x720sc-request-2.81.0-nodejs-6.14.3/lib/node_modules/request/request.js:884:8)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! stack     at ClientRequest.emit (events.js:188:7)
gyp ERR! stack     at TLSSocket.socketErrorListener (_http_client.js:314:9)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! stack     at TLSSocket.emit (events.js:188:7)
gyp ERR! stack     at connectErrorNT (net.js:1034:8)
gyp ERR! System Linux 4.14.51
gyp ERR! command "/nix/store/n05xf7py24n48q36azbwz1gim0sayram-nodejs-6.14.3/bin/node" "/nix/store/a3d5f158c89v97fq1gn40x677f9pkh8c-node-gyp-3.7.0-nodejs-6.14.3/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /build/package
gyp ERR! node -v v6.14.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
postinstall script failed
builder for '/nix/store/jz7yx11s7jimg8fak69hsi78whklsc93-node-sass-4.9.0-nodejs-6.14.3.drv' failed with exit code 1
error: build of '/nix/store/jz7yx11s7jimg8fak69hsi78whklsc93-node-sass-4.9.0-nodejs-6.14.3.drv' failed

@srghma
Copy link
Contributor Author

srghma commented Jul 1, 2018

@adnelson
Copy link
Owner

adnelson commented Jul 3, 2018

Haven't digged in but from the output you pasted it looks like the install step for this package executes a script scripts/install.js which is doing some kind of fetching from the internet, which is disallowed during a nix build (assuming you have sandboxing enabled). This kind of thing is unfortunately pretty much only solvable by modifying the autogenerated definition of the package, adding a patch step to either modify or skip the install script.

@srghma
Copy link
Contributor Author

srghma commented Jul 3, 2018

@adnelson I think we can close this issue since it only reproducible in nix repl

@shmish111
Copy link

I am having the same issue with nix-build on a nixos machine. Strangely it was working on a similar machine yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants