by sanmak on 10/12/2024, 1:44:29 PM with 0 comments
If you're dealing with storage issues while juggling multiple Node.js and Next.js projects, I've found a quick and effective solution: delete node_modules and .next folders for projects not in active development. You can automate it with these commands:
For node_modules:
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
For Next.js .next folders:
find . -name '.next' -type d -prune -print -exec rm -rf '{}' \;
If you're dealing with storage issues while juggling multiple Node.js and Next.js projects, I've found a quick and effective solution: delete node_modules and .next folders for projects not in active development. You can automate it with these commands:
For node_modules: find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
For Next.js .next folders: find . -name '.next' -type d -prune -print -exec rm -rf '{}' \;