{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/5036","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/5036/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/5036/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/5036/events","html_url":"https://github.com/ember-cli/ember-cli/pull/5036","id":115084065,"number":5036,"title":"[WIP] Update to NPM 3.3.12 to remove native bundled dependencies","user":{"login":"patocallaghan","id":685034,"avatar_url":"https://avatars.githubusercontent.com/u/685034?v=3","gravatar_id":"","url":"https://api.github.com/users/patocallaghan","html_url":"https://github.com/patocallaghan","followers_url":"https://api.github.com/users/patocallaghan/followers","following_url":"https://api.github.com/users/patocallaghan/following{/other_user}","gists_url":"https://api.github.com/users/patocallaghan/gists{/gist_id}","starred_url":"https://api.github.com/users/patocallaghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patocallaghan/subscriptions","organizations_url":"https://api.github.com/users/patocallaghan/orgs","repos_url":"https://api.github.com/users/patocallaghan/repos","events_url":"https://api.github.com/users/patocallaghan/events{/privacy}","received_events_url":"https://api.github.com/users/patocallaghan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ember-cli/ember-cli/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-04T15:53:05Z","updated_at":"2015-11-05T16:49:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ember-cli/ember-cli/pulls/5036","html_url":"https://github.com/ember-cli/ember-cli/pull/5036","diff_url":"https://github.com/ember-cli/ember-cli/pull/5036.diff","patch_url":"https://github.com/ember-cli/ember-cli/pull/5036.patch"},"body":"Re: https://github.com/ember-cli/ember-cli/issues/5028#issuecomment-153405634\r\n\r\n@stefanpenner this is more a placeholder for discussion rather than a finished PR. Would appreciate you chiming in with your thoughts whether this is even on the right track or not.\r\n\r\n## ws.js\r\nIt seems the issue of failing native dependencies has been fixed in npm 3.3.12\r\n\r\n* Optional dependencies causing an install to fail was fixed in https://github.com/npm/npm/commit/2289234e11b30c878585aebee68d4a3a5bd63cce See https://github.com/npm/npm/issues/9643 for the related issue\r\n* running `--no-optional` should not try to install bundled dependencies in deps of deps\r\n\r\nThis means we don't need the patch for `ws.js` as `bufferutil` and `utf8-validation` will not be installed.\r\n\r\n## patch-engine-io-client.js\r\nit appears the reference to the `tgz` [has been removed](https://github.com/socketio/engine.io-client/pull/401/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L38) but it hasn't shipped in a release yet . Not entirely sure what we can do here though besides pushing for a release or making our own fork.\r\n\r\n### BUT\r\n\r\nthere's a bug with the 3.3.12 version of NPM which prevents `./bin/prepare-release` from finishing. If you try to `npm uninstall` or `npm unlink` a `npm link`'d global module, the build fails. This means `prepare-release` fails at the second last step when uninstalling the global `ember-cli`.  See here for more on the issue https://github.com/npm/npm/issues/9980.\r\n\r\nWe could possibly do a `which ember`, work out where the global ember is installed, and manually `rm -rf` it?\r\n"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/154119470","html_url":"https://github.com/ember-cli/ember-cli/pull/5036#issuecomment-154119470","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/5036","id":154119470,"user":{"login":"patocallaghan","id":685034,"avatar_url":"https://avatars.githubusercontent.com/u/685034?v=3","gravatar_id":"","url":"https://api.github.com/users/patocallaghan","html_url":"https://github.com/patocallaghan","followers_url":"https://api.github.com/users/patocallaghan/followers","following_url":"https://api.github.com/users/patocallaghan/following{/other_user}","gists_url":"https://api.github.com/users/patocallaghan/gists{/gist_id}","starred_url":"https://api.github.com/users/patocallaghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patocallaghan/subscriptions","organizations_url":"https://api.github.com/users/patocallaghan/orgs","repos_url":"https://api.github.com/users/patocallaghan/repos","events_url":"https://api.github.com/users/patocallaghan/events{/privacy}","received_events_url":"https://api.github.com/users/patocallaghan/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T16:49:58Z","updated_at":"2015-11-05T16:49:58Z","body":"So did some testing with npm3. Running `./bin/prepare-release` with npm 3 is currently busted for two reasons:\r\n\r\n1. npm/npm#9980 means the script fails because you can't unlink or uninstall a global package. It needs to be manually nuked\r\n2. The `patches/patch-engine-io-client.js` patch script doesn't work as is because npm 3 now puts all packages in `node_modules` in a flat structure rather than a nested structure. We'd need to update the script to accommodate this.\r\n\r\nAs for whether you can install `ember-cli` with the patched `.tgz` using npm3? Nope, it doesn't work. Even though we have the patched package.json's inside the `tgz` it still manages to install the optional dependencies :disappointed: "}}