I want to traverse all subdirectories, except the \"node_modules\" directory.
A simpler way would be to filter your results using "grep -v".
grep -i needle -R * | grep -v node_modules