I used git grep to find all require statements coupled with sed, sort and uniq to create a list of all node modules actually required in our code, then went through package.json to make the list match our dependencies.