clockworklabs / clockworklabs/SpacetimeDB

TypeScript SDK - module_bindings does not import correctly from @clockworklabs-spacetimedb-sdk

Open
#3,024 5 comments 7 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.