-
Notifications
You must be signed in to change notification settings - Fork 757
Description
Description
spacetime dev accepts a --module-path CLI flag and a "module-path" key in spacetime.json, but the file watcher ignores both and always watches <project-path>/spacetimedb/ regardless.
This makes spacetime dev unusable for projects where the server module and client are in separate repositories/directories (e.g., a meta-repo with git submodules).
Steps to Reproduce
-
Have a project structure where server and client are in separate directories:
project/ repos/server/ # Rust SpacetimeDB module repos/client/ # TypeScript client -
Create
spacetime.jsonin the client directory:{ "server": "local", "module-path": "D:/Projects/my-project/repos/server", "module-bindings-path": "src/module_bindings" } -
Run from the client directory:
spacetime dev my-database --server-only -y
Expected Behavior
File watcher should watch the path specified in module-path:
Watching for changes in: D:\Projects\my-project\repos\server
Actual Behavior
File watcher ignores module-path and defaults to <project-path>/spacetimedb/:
Starting development mode...
Database: my-database
Watching for changes in: D:\Projects\my-project\repos\client\.\spacetimedb
Press Ctrl+C to stop
Building...
Error: Failed to build project
Caused by:
Could not detect the language of the module. Are you in a SpacetimeDB project directory?
Same behavior occurs with --module-path as a CLI flag — the flag is accepted but the watcher still uses the default path.
Environment
- SpacetimeDB CLI: 2.0.1
- OS: Windows 11
- Project layout: Git submodules with separate server/client repos
Related Issues
- spacetime dev issues #3579 — Other
spacetime devissues - Docs for
spacetime dev#3890 — Docs forspacetime dev