{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node-gyp/issues/787","labels_url":"https://api.github.com/repos/nodejs/node-gyp/issues/787/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node-gyp/issues/787/comments","events_url":"https://api.github.com/repos/nodejs/node-gyp/issues/787/events","html_url":"https://github.com/nodejs/node-gyp/issues/787","id":113718641,"number":787,"title":"node-gyp rebuild downloads headers from incorrect location","user":{"login":"mzgol","id":1758366,"avatar_url":"https://avatars.githubusercontent.com/u/1758366?v=3","gravatar_id":"","url":"https://api.github.com/users/mzgol","html_url":"https://github.com/mzgol","followers_url":"https://api.github.com/users/mzgol/followers","following_url":"https://api.github.com/users/mzgol/following{/other_user}","gists_url":"https://api.github.com/users/mzgol/gists{/gist_id}","starred_url":"https://api.github.com/users/mzgol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzgol/subscriptions","organizations_url":"https://api.github.com/users/mzgol/orgs","repos_url":"https://api.github.com/users/mzgol/repos","events_url":"https://api.github.com/users/mzgol/events{/privacy}","received_events_url":"https://api.github.com/users/mzgol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-28T00:39:28Z","updated_at":"2015-10-28T14:18:33Z","closed_at":null,"body":"I thought that `node-gyp` `3.0.3` should have this all fixed by taking the data from `process.release` but it still downloads from the default one for me:\r\n```\r\n$ node --version\r\nv4.2.1\r\n$ npm --version\r\n3.3.10\r\n$ node -p process.release\r\n{ name: 'node',\r\n  lts: 'Argon',\r\n  sourceUrl: 'https://nodejs.org/download/release/v4.2.1/node-v4.2.1.tar.gz',\r\n  headersUrl: 'https://nodejs.org/download/release/v4.2.1/node-v4.2.1-headers.tar.gz' }\r\n\r\n$ npm i node-sass@3.4.1\r\n```\r\nSwitch to Node 5 & then (notice the incorrect URL https://nodejs.org/dist/v5.0.0-rc.1/node-v5.0.0-rc.1-headers.tar.gz):\r\n```\r\n$ node --version\r\nv5.0.0-rc.1\r\n$ npm --version\r\n3.3.10\r\n$ node -p process.release\r\n{ name: 'node',\r\n  sourceUrl: 'https://nodejs.org/download/rc/v5.0.0-rc.1/node-v5.0.0-rc.1.tar.gz',\r\n  headersUrl: 'https://nodejs.org/download/rc/v5.0.0-rc.1/node-v5.0.0-rc.1-headers.tar.gz' }\r\n$ npm rebuild node-sass\r\n\r\n> node-sass@3.4.1 install /Users/mgol/_/node_modules/node-sass\r\n> node scripts/install.js\r\n\r\nCannot download \"https://github.com/sass/node-sass/releases/download/v3.4.1/darwin-x64-47_binding.node\": \r\n\r\nHTTP error 404 Not Found\r\n\r\nHint: If github.com is not accessible in your location\r\n      try setting a proxy via HTTP_PROXY, e.g. \r\n\r\n      export HTTP_PROXY=http://example.com:1234\r\n\r\nor configure npm proxy via\r\n\r\n      npm config set proxy http://example.com:8080\r\n\r\n> node-sass@3.4.1 postinstall /Users/mgol/_/node_modules/node-sass\r\n> node scripts/build.js\r\n\r\nBuilding: /Users/mgol/.nvm/versions/node/v5.0.0-rc.1/bin/node /Users/mgol/_/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=\r\ngyp info it worked if it ends with ok\r\ngyp verb cli [ '/Users/mgol/.nvm/versions/node/v5.0.0-rc.1/bin/node',\r\ngyp verb cli   '/Users/mgol/_/node_modules/node-gyp/bin/node-gyp.js',\r\ngyp verb cli   'rebuild',\r\ngyp verb cli   '--verbose',\r\ngyp verb cli   '--libsass_ext=',\r\ngyp verb cli   '--libsass_cflags=',\r\ngyp verb cli   '--libsass_ldflags=',\r\ngyp verb cli   '--libsass_library=' ]\r\ngyp info using node-gyp@3.0.3\r\ngyp info using node@5.0.0-rc.1 | darwin | x64\r\ngyp verb command rebuild []\r\ngyp verb command clean []\r\ngyp verb clean removing \"build\" directory\r\ngyp verb command configure []\r\ngyp verb check python checking for Python executable \"python2\" in the PATH\r\ngyp verb `which` failed Error: not found: python2\r\ngyp verb `which` failed     at F (/Users/mgol/_/node_modules/which/which.js:78:19)\r\ngyp verb `which` failed     at E (/Users/mgol/_/node_modules/which/which.js:82:29)\r\ngyp verb `which` failed     at /Users/mgol/_/node_modules/which/which.js:93:16\r\ngyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)\r\ngyp verb `which` failed  python2 [Error: not found: python2]\r\ngyp verb check python checking for Python executable \"python\" in the PATH\r\ngyp verb `which` succeeded python /usr/bin/python\r\ngyp verb check python version `python -c \"import platform; print(platform.python_version());\"` returned: \"2.7.10\\n\"\r\ngyp verb get node dir no --target version specified, falling back to host node version: 5.0.0-rc.1\r\ngyp verb command install [ '5.0.0-rc.1' ]\r\ngyp verb install input version string \"5.0.0-rc.1\"\r\ngyp verb install installing version: 5.0.0-rc.1\r\ngyp verb install --ensure was passed, so won't reinstall if already installed\r\ngyp verb install version not already installed, continuing with install 5.0.0-rc.1\r\ngyp verb ensuring nodedir is created /Users/mgol/.node-gyp/5.0.0-rc.1\r\ngyp verb created nodedir /Users/mgol/.node-gyp/5.0.0-rc.1\r\ngyp http GET https://nodejs.org/dist/v5.0.0-rc.1/node-v5.0.0-rc.1-headers.tar.gz\r\ngyp http 404 https://nodejs.org/dist/v5.0.0-rc.1/node-v5.0.0-rc.1-headers.tar.gz\r\ngyp WARN install got an error, rolling back install\r\ngyp verb command remove [ '5.0.0-rc.1' ]\r\ngyp verb remove using node-gyp dir: /Users/mgol/.node-gyp\r\ngyp verb remove removing target version: 5.0.0-rc.1\r\ngyp verb remove removing development files for version: 5.0.0-rc.1\r\ngyp ERR! configure error \r\ngyp ERR! stack Error: 404 response downloading https://nodejs.org/dist/v5.0.0-rc.1/node-v5.0.0-rc.1-headers.tar.gz\r\ngyp ERR! stack     at Request.<anonymous> (/Users/mgol/_/node_modules/node-gyp/lib/install.js:244:14)\r\ngyp ERR! stack     at emitOne (events.js:82:20)\r\ngyp ERR! stack     at Request.emit (events.js:169:7)\r\ngyp ERR! stack     at Request.onRequestResponse (/Users/mgol/_/node_modules/request/request.js:998:10)\r\ngyp ERR! stack     at emitOne (events.js:77:13)\r\ngyp ERR! stack     at ClientRequest.emit (events.js:169:7)\r\ngyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:418:21)\r\ngyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)\r\ngyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:308:20)\r\ngyp ERR! stack     at emitOne (events.js:77:13)\r\ngyp ERR! System Darwin 15.0.0\r\ngyp ERR! command \"/Users/mgol/.nvm/versions/node/v5.0.0-rc.1/bin/node\" \"/Users/mgol/_/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\" \"--verbose\" \"--libsass_ext=\" \"--libsass_cflags=\" \"--libsass_ldflags=\" \"--libsass_library=\"\r\ngyp ERR! cwd /Users/mgol/_/node_modules/node-sass\r\ngyp ERR! node -v v5.0.0-rc.1\r\ngyp ERR! node-gyp -v v3.0.3\r\ngyp ERR! not ok \r\nBuild failed\r\n\r\nnpm ERR! Darwin 15.0.0\r\nnpm ERR! argv \"/Users/mgol/.nvm/versions/node/v5.0.0-rc.1/bin/node\" \"/Users/mgol/.nvm/versions/node/v5.0.0-rc.1/bin/npm\" \"rebuild\" \"node-sass\"\r\nnpm ERR! node v5.0.0-rc.1\r\nnpm ERR! npm  v3.3.10\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! node-sass@3.4.1 postinstall: `node scripts/build.js`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the node-sass@3.4.1 postinstall script 'node scripts/build.js'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the node-sass package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node scripts/build.js\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls node-sass\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/mgol/_/npm-debug.log\r\n```"},"comment":{"url":"https://api.github.com/repos/nodejs/node-gyp/issues/comments/151859037","html_url":"https://github.com/nodejs/node-gyp/issues/787#issuecomment-151859037","issue_url":"https://api.github.com/repos/nodejs/node-gyp/issues/787","id":151859037,"user":{"login":"saper","id":248374,"avatar_url":"https://avatars.githubusercontent.com/u/248374?v=3","gravatar_id":"","url":"https://api.github.com/users/saper","html_url":"https://github.com/saper","followers_url":"https://api.github.com/users/saper/followers","following_url":"https://api.github.com/users/saper/following{/other_user}","gists_url":"https://api.github.com/users/saper/gists{/gist_id}","starred_url":"https://api.github.com/users/saper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saper/subscriptions","organizations_url":"https://api.github.com/users/saper/orgs","repos_url":"https://api.github.com/users/saper/repos","events_url":"https://api.github.com/users/saper/events{/privacy}","received_events_url":"https://api.github.com/users/saper/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T14:18:33Z","updated_at":"2015-10-28T14:18:33Z","body":"> @rvagg @saper So, it seems unrelated to `node-sass` after all. I can't reproduce your success in installing `bufferutils`, either on npm@3.3.6 or npm@3.3.10 so either `npm` or `node-gyp` seems to be to blame; not sure why it works for you...\n> ```\n> $ npm i bufferutil  \n> \n> > bufferutil@1.2.1 install /Users/mgol/_/node_modules/bufferutil\n> > node-gyp rebuild\n\nWhat does this say?\n\n    find /Users/mgol -name node-gyp\n\n"}}