Skip to content

Comments

Improve spacetime build for typescript#4330

Merged
coolreader18 merged 2 commits intomasterfrom
noa/ts-better-build
Feb 18, 2026
Merged

Improve spacetime build for typescript#4330
coolreader18 merged 2 commits intomasterfrom
noa/ts-better-build

Conversation

@coolreader18
Copy link
Collaborator

@coolreader18 coolreader18 commented Feb 17, 2026

Description of Changes

This fixes the confusing error encountered by @gefjon:

$ spacetime publish -s local --module-path spacetimedb --no-config event-table-test-ts
Rolldown warning: Could not resolve 'spacetimedb/server' in spacetimedb/src/index.ts
Error: Your module doesn't import the `spacetimedb/server` package at all - this is likely a mistake, as your module will not be able to interface with the SpacetimeDB host.

After:

[UNRESOLVED_IMPORT] Error: Could not resolve 'spacetimedb/server' in src/index.ts
   ╭─[ src/index.ts:1:47 ]
   │
 1 │ import { schema, table, t, SenderError } from 'spacetimedb/server';
   │                                               ──────────┬─────────  
   │                                                         ╰─────────── Module not found.
   │ 
   │ Help: You may have forgotten to install dependencies with your package manager.
───╯

And also runs tsc, so that modules with type errors aren't silently published. Perhaps we want a --skip-tsc so that people can run anyway and get runtime errors?

Expected complexity level and risk

2

Testing

  • Ensured that tsc and rolldown errors are properly emitted.

@coolreader18 coolreader18 changed the title Improve spacetime build for typescript. Improve spacetime build for typescript Feb 17, 2026
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

Beautiful! This is a great fix.

@coolreader18 coolreader18 added this pull request to the merge queue Feb 18, 2026
Merged via the queue into master with commit 0799bec Feb 18, 2026
37 of 38 checks passed
@coolreader18 coolreader18 deleted the noa/ts-better-build branch February 18, 2026 03:06
@coolreader18 coolreader18 mentioned this pull request Feb 18, 2026
1 task
github-merge-queue bot pushed a commit that referenced this pull request Feb 18, 2026
# Description of Changes

Forgot to push something for #4330, whoops. Now it will actually give
the output in that PR.

# Testing

- [x] Already tested.
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.

2 participants