Skip to content

Comments

Fix various TS templates#4360

Merged
clockwork-labs-bot merged 2 commits intomasterfrom
fix-templates
Feb 20, 2026
Merged

Fix various TS templates#4360
clockwork-labs-bot merged 2 commits intomasterfrom
fix-templates

Conversation

@bradleyshep
Copy link
Contributor

Description of Changes

Fix withModuleName -> withDatabaseName in server-side code across multiple TypeScript templates. The 2.0 SDK renamed this method, but several templates still used the old 1.x API name, causing a runtime error (DbConnection.builder(...).withUri(...).withModuleName is not a function).

Files changed:

  • templates/nuxt-ts/server/api/people.get.ts
  • templates/remix-ts/app/lib/spacetimedb.server.ts
  • templates/nextjs-ts/lib/spacetimedb-server.ts
  • templates/nodejs-ts/src/main.ts
  • templates/deno-ts/src/main.ts
  • templates/keynote-2/src/connectors/spacetimedb.ts

API and ABI breaking changes

None. This aligns templates with the existing 2.0 SDK API.

Expected complexity level and risk

1 — Trivial string replacement across template files. No logic changes.

Testing

  • Run spacetime dev --template nuxt-ts and verify the Nuxt SSR server API (/api/people) connects without withModuleName is not a function error
  • Run spacetime dev --template nextjs-ts and verify the server-side SpacetimeDB connection works
  • Run spacetime dev --template remix-ts and verify the server-side SpacetimeDB connection works

Copy link
Contributor

@clockwork-tien clockwork-tien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nuxt changes looks good from my testing (edit: I just now noticed template issue re tables e.g. for Nuxt potentially with recent module_bindings/api updates, but it is unrelated to PR)

@clockwork-labs-bot clockwork-labs-bot added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit cea601f Feb 20, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants