diff --git a/README.md b/README.md index 0c7a06a6..44fc8058 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,16 @@ To run tests in watch mode (except the `infra` tests, which use Jest): pnpm vitest ``` +If you start having unexplained build errors, the following commands are useful to clean up and start fresh. + +```bash +pnpm clean:dist # removes previously built files recursively +pnpm clean:modules # removes node_module directories recursively + +# ... run more commands like pnpm install and pnpm build after you have run these +``` + + To start developing with hot reloading, use: ```bash diff --git a/package.json b/package.json index 6e595757..5b7e7916 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "scripts": { "build": "turbo run build --filter=!@atj/infra-cdktf", "clean": "turbo run clean", + "clean:modules": "find $(git rev-parse --show-toplevel) -name 'node_modules' -type d -prune -exec rm -rf '{}' +", + "clean:dist": "find $(git rev-parse --show-toplevel) -name 'dist' -type d -prune -exec rm -rf '{}' +", "dev": "turbo run dev --concurrency 20", "format": "prettier --write \"packages/*/src/**/*.{js,jsx,ts,tsx,scss,css}\"", "lint": "turbo run lint",