{"action":"created","issue":{"url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/266","repository_url":"https://api.github.com/repos/uWebSockets/uWebSockets","labels_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/266/comments","events_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/266/events","html_url":"https://github.com/uWebSockets/uWebSockets/issues/266","id":180903542,"number":266,"title":"node-gyp won't overwrite prebuilt binary when cp is aliased to cp -i","user":{"login":"mstdokumaci","id":1632069,"avatar_url":"https://avatars.githubusercontent.com/u/1632069?v=3","gravatar_id":"","url":"https://api.github.com/users/mstdokumaci","html_url":"https://github.com/mstdokumaci","followers_url":"https://api.github.com/users/mstdokumaci/followers","following_url":"https://api.github.com/users/mstdokumaci/following{/other_user}","gists_url":"https://api.github.com/users/mstdokumaci/gists{/gist_id}","starred_url":"https://api.github.com/users/mstdokumaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstdokumaci/subscriptions","organizations_url":"https://api.github.com/users/mstdokumaci/orgs","repos_url":"https://api.github.com/users/mstdokumaci/repos","events_url":"https://api.github.com/users/mstdokumaci/events{/privacy}","received_events_url":"https://api.github.com/users/mstdokumaci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-04T14:08:44Z","updated_at":"2016-10-05T11:35:37Z","closed_at":"2016-10-04T16:36:03Z","body":"When you `npm install` uws on an unusual linux, prebuilt binaries are incompatible and won't work.\r\n\r\n`node-gyp` script overwrites the binary anyway, however it fails on systems with aliased `cp`.\r\n\r\nCheck this line:\r\nhttps://github.com/uWebSockets/uWebSockets/blob/master/nodejs/dist/binding.gyp#L55\r\n\r\nIf there is an existing incompatible binary, and `cp` is aliased to `cp -i` by default, this above line fails to overwrite.\r\n\r\nPossible solutions:\r\n\r\n1. Do not include any prebuilt binaries in npm package, so `node-gyp` will make the necessary one at install time.\r\n2. Use `\\cp` instead of `cp` so it'll skip alias and use original `cp` command."},"comment":{"url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/comments/251650497","html_url":"https://github.com/uWebSockets/uWebSockets/issues/266#issuecomment-251650497","issue_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/266","id":251650497,"user":{"login":"mstdokumaci","id":1632069,"avatar_url":"https://avatars.githubusercontent.com/u/1632069?v=3","gravatar_id":"","url":"https://api.github.com/users/mstdokumaci","html_url":"https://github.com/mstdokumaci","followers_url":"https://api.github.com/users/mstdokumaci/followers","following_url":"https://api.github.com/users/mstdokumaci/following{/other_user}","gists_url":"https://api.github.com/users/mstdokumaci/gists{/gist_id}","starred_url":"https://api.github.com/users/mstdokumaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstdokumaci/subscriptions","organizations_url":"https://api.github.com/users/mstdokumaci/orgs","repos_url":"https://api.github.com/users/mstdokumaci/repos","events_url":"https://api.github.com/users/mstdokumaci/events{/privacy}","received_events_url":"https://api.github.com/users/mstdokumaci/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T11:35:37Z","updated_at":"2016-10-05T11:35:37Z","body":"For now, our workaround is an npm install script like this:\r\n`(test -d ../uws && cd ../uws && rm uws_*.node && npm install) || (test -d node_modules/uws && cd node_modules/uws && rm uws_*.node && npm install)`\r\n\r\nthis basically finds uws folder deletes prebuilt binaries and runs the node-gyp again.\r\nit's an ugly solution but it works for us.\r\n\r\nthe \\cp solution i suggested was from here: https://stackoverflow.com/questions/8488253/how-to-force-cp-to-overwrite-without-confirmation\r\n\r\nyou might test `yes | cp` or `command cp` as well."}}
{"actor":{"display_login":"mstdokumaci"}}