clockworklabs / clockworklabs/SpacetimeDB
TypeScript SDK - module_bindings does not import correctly from @clockworklabs-spacetimedb-sdk
Open
@jsdt is already working on this.
Since Apr 21, 2025.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
I'm making a simple Typescript 5.8.0 project, where I run the command to generate the module_bindings folder:
spacetime generate --lang typescript --out-dir client/src/module_bindings --project-path server
This creates .ts files with imports from the @clockworklabs-spacetimedb-sdk.
CallReducerFlags for example is being imported as a variable, not as a type. So importing the current module_bindings results in this error:
Uncaught SyntaxError: The requested module 'http://localhost:5173/node_modules/.vite/deps/@clockworklabs_spacetimedb-sdk.js?v=8b3b85f2' doesn't provide an export named: 'CallReducerFlags'
Am I doing something wrong or is there a version mismatch between the sdk and the module_bindings?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.