Bug Summary
When running harper dev . from a directory whose path contains a dotfile directory (e.g. .claude), the static extension fails to serve files — all requests return 404. Other extensions (jsResource, fastifyRoutes, graphqlSchema, loadEnv) work correctly from the same path.
Reproduction Repository (if applicable)
No response
Steps to Reproduce
- Create a Harper app with a
static extension in config.yaml:
static:
files: 'site/**'
urlPath: 'app'
index: true
extensions: ['html']
- Place HTML files in the
site/ directory
- Run
harper dev . from a path containing a dotfile directory, e.g.:
/Users/me/my-app/.hidden-dir/worktrees/my-branch/
- Request
http://localhost:9926/app/ → 404
- Request
http://localhost:9926/HealthCheck (jsResource) → 200 ✅
Expected Behavior
Static files are served at /app/ regardless of the app's directory path.
Actual Behavior
Static files return 404 when the path includes a dotfile directory. Other extensions load fine.
Platform
Harper 4.7.20 (also reproduced on 4.7.3 and 4.7.19), Node.js v24.11.0, macOS
Console Errors
No response
Screenshots or Videos
No response
Additional Context
Workaround: Run harper dev . from a path that doesn't contain dotfile directories (e.g. the main repo root rather than a git worktree under a hidden directory).
- File permissions are all standard (755 dirs, 644 files) — not a permissions issue
loadEnv loads correctly from the same path (env conflict warnings confirm Harper finds the right directory)
- Fresh Harper install (removed data directory and reinstalled) — same result
- The same app code works perfectly when deployed to Harper Fabric
- The same app works with
harper dev . from the main repo path (/Users/me/my-app/) which has no dotfile directories
- This was discovered using git worktrees located under
.claude/worktrees/, a common pattern with Claude Code
Are you planning to fix this issue?
No, just reporting the issue
First-time contributor support
Bug Summary
When running harper dev . from a directory whose path contains a dotfile directory (e.g. .claude), the static extension fails to serve files — all requests return 404. Other extensions (jsResource, fastifyRoutes, graphqlSchema, loadEnv) work correctly from the same path.
Reproduction Repository (if applicable)
No response
Steps to Reproduce
staticextension inconfig.yaml:site/directoryharper dev .from a path containing a dotfile directory, e.g.:/Users/me/my-app/.hidden-dir/worktrees/my-branch/http://localhost:9926/app/→ 404http://localhost:9926/HealthCheck(jsResource) → 200 ✅Expected Behavior
Static files are served at
/app/regardless of the app's directory path.Actual Behavior
Static files return 404 when the path includes a dotfile directory. Other extensions load fine.
Platform
Harper 4.7.20 (also reproduced on 4.7.3 and 4.7.19), Node.js v24.11.0, macOS
Console Errors
No response
Screenshots or Videos
No response
Additional Context
Workaround: Run
harper dev .from a path that doesn't contain dotfile directories (e.g. the main repo root rather than a git worktree under a hidden directory).loadEnvloads correctly from the same path (env conflict warnings confirm Harper finds the right directory)harper dev .from the main repo path (/Users/me/my-app/) which has no dotfile directories.claude/worktrees/, a common pattern with Claude CodeAre you planning to fix this issue?
No, just reporting the issue
First-time contributor support