I want to traverse all subdirectories, except the \"node_modules\" directory.
If you are grepping for code in a git repository and node_modules is in your .gitignore, you can use git grep. git grep searches the tracked files in the working tree, ignoring everything from .gitignore
node_modules
.gitignore
git grep
git grep "STUFF"