Last active
July 28, 2022 16:25
-
-
Save agirorn/9c226a295f581ceab22e41afd5d5ee32 to your computer and use it in GitHub Desktop.
Compleate node_modules reinstall for yarn workspaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Steps: | |
# 1 Remove node_modules and yarn.lock from project root | |
# 2 Remove node_modules from all folders under packages | |
# 3 Install all the node_modules | |
rm -Rf node_modules yarn.lock \ | |
&& find packages/ \ | |
-name node_modules \ | |
-maxdepth 2 \ | |
-exec rm -rf '{}' \; \ | |
&& yarn install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment