Check size of all Node Modules

Find all of the Node module directories, check how big each one is and the total amount of space it takes up (it can be a surprising amount of space)

find . -name "node_modules" -type d -prune -print | xargs du -chs
Updated: 6 February 2022

Delete all Node Modules

Delete all of your node modules from your mac and sit there, shocked at the number of modules you've just erased.

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \\;
Updated: 6 February 2022

Kill a port that's being used

For that annoying error when your dev script is trying to use a port thats already in use

npx kill-port 3000
Updated: 10 March 2022