{"action":"opened","issue":{"url":"https://api.github.com/repos/capistrano/npm/issues/12","labels_url":"https://api.github.com/repos/capistrano/npm/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/capistrano/npm/issues/12/comments","events_url":"https://api.github.com/repos/capistrano/npm/issues/12/events","html_url":"https://github.com/capistrano/npm/issues/12","id":58027701,"number":12,"title":"Does flow order need changing?","user":{"login":"timkinnane","id":1774379,"avatar_url":"https://avatars.githubusercontent.com/u/1774379?v=3","gravatar_id":"","url":"https://api.github.com/users/timkinnane","html_url":"https://github.com/timkinnane","followers_url":"https://api.github.com/users/timkinnane/followers","following_url":"https://api.github.com/users/timkinnane/following{/other_user}","gists_url":"https://api.github.com/users/timkinnane/gists{/gist_id}","starred_url":"https://api.github.com/users/timkinnane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timkinnane/subscriptions","organizations_url":"https://api.github.com/users/timkinnane/orgs","repos_url":"https://api.github.com/users/timkinnane/repos","events_url":"https://api.github.com/users/timkinnane/events{/privacy}","received_events_url":"https://api.github.com/users/timkinnane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-18T05:16:20Z","updated_at":"2015-02-18T05:16:20Z","closed_at":null,"body":"I've found for my workflow that the default attachment of npm:install is too early.\r\nIt runs before my deploy repo has been cloned, so it doesn't have the updated package.json, thus doesn't install the correct node modules for the current version.\r\n\r\nI've kinda hack solved it, by removing the task from 'before :updated' and reattaching after.\r\n```\r\nRake::Task['deploy:updated'].prerequisites.delete('npm:install') # don't run npm before repo updated\r\nafter :updated, 'npm:install' # has to run after git clone to get updated pacjage.json\r\n````\r\nI'm wondering if instead it's worth doing a fork, changing the default, then pull request?"}}