{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/4134","labels_url":"https://api.github.com/repos/npm/npm/issues/4134/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/4134/comments","events_url":"https://api.github.com/repos/npm/npm/issues/4134/events","html_url":"https://github.com/npm/npm/issues/4134","id":22649380,"number":4134,"title":"npm runs postinstall script before dependencies are loaded","user":{"login":"fresheneesz","id":149531,"avatar_url":"https://avatars.githubusercontent.com/u/149531?v=3","gravatar_id":"","url":"https://api.github.com/users/fresheneesz","html_url":"https://github.com/fresheneesz","followers_url":"https://api.github.com/users/fresheneesz/followers","following_url":"https://api.github.com/users/fresheneesz/following{/other_user}","gists_url":"https://api.github.com/users/fresheneesz/gists{/gist_id}","starred_url":"https://api.github.com/users/fresheneesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fresheneesz/subscriptions","organizations_url":"https://api.github.com/users/fresheneesz/orgs","repos_url":"https://api.github.com/users/fresheneesz/repos","events_url":"https://api.github.com/users/fresheneesz/events{/privacy}","received_events_url":"https://api.github.com/users/fresheneesz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/bug","name":"bug","color":"C40233"},{"url":"https://api.github.com/repos/npm/npm/labels/lifecycle","name":"lifecycle","color":"DFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2013-11-14T08:45:02Z","updated_at":"2015-02-03T21:26:36Z","closed_at":null,"body":"I gave some information in here: https://github.com/isaacs/npm/issues/4096 but basically, I'm getting majorly bizarre issues when installing `build-modules`. It looks to me like the postinstall script of one of its dependencies is being run too early. If that's true, its a huge problem."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/72738275","html_url":"https://github.com/npm/npm/issues/4134#issuecomment-72738275","issue_url":"https://api.github.com/repos/npm/npm/issues/4134","id":72738275,"user":{"login":"smikes","id":5124609,"avatar_url":"https://avatars.githubusercontent.com/u/5124609?v=3","gravatar_id":"","url":"https://api.github.com/users/smikes","html_url":"https://github.com/smikes","followers_url":"https://api.github.com/users/smikes/followers","following_url":"https://api.github.com/users/smikes/following{/other_user}","gists_url":"https://api.github.com/users/smikes/gists{/gist_id}","starred_url":"https://api.github.com/users/smikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smikes/subscriptions","organizations_url":"https://api.github.com/users/smikes/orgs","repos_url":"https://api.github.com/users/smikes/repos","events_url":"https://api.github.com/users/smikes/events{/privacy}","received_events_url":"https://api.github.com/users/smikes/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T21:26:36Z","updated_at":"2015-02-03T21:26:36Z","body":"Is this still a problem for you?\r\n\r\nSome of the raciness of `npm install` may have been mitigated by solving race conditions around caching, and installation; coupled with the `inflight` module which allows callbacks to be added to in-process installations, this seems to have been improved.\r\n\r\nUnfortunately I cannot build `deadunit@2.0.7` because it throws errors that appear to be unrelated to this problem:\r\n```\r\n \r\n> proto@1.0.8 postinstall /Users/smikes/src/github/baz/node_modules/deadunit/node_modules/proto\r\n> node build.js\r\n\r\nbuilding and minifying...\r\ndone\r\n/\r\n> stackinfo@1.0.0 postinstall /Users/smikes/src/github/baz/node_modules/deadunit/node_modules/deadunit-core/node_modules/stackinfo\r\n> node build.js\r\n\r\nbuilding and minifying...\r\nError: bundle() no longer accepts option arguments.\r\nMove all option arguments to the browserify() constructor.\r\n```\r\n\r\n`deadunit@latest` is 5.1.7, which installs with no apparent problems.\r\n\r\nIf you still believe this bug is present in `npm`, please let us know.  Probably the upcoming `multi-stage-install` milestone will include a fix for it -- that is the eventual completion of the \"lot of work\" referred to above.\r\n\r\n/cc @iarna as possibly multi-stage-install related"}}