[TS] Fix development exports breaking NextJS#3796
Merged
cloutiertyler merged 2 commits intoclockworklabs:masterfrom Dec 2, 2025
Hidden character warning
The head ref may contain hidden characters: "dev-not-deving\ud83d\ude20"
Merged
[TS] Fix development exports breaking NextJS#3796cloutiertyler merged 2 commits intoclockworklabs:masterfrom
development exports breaking NextJS#3796cloutiertyler merged 2 commits intoclockworklabs:masterfrom
Conversation
cloutiertyler
approved these changes
Dec 2, 2025
Contributor
There was a problem hiding this comment.
I am okay with this change.
For context, this was included so that other packages within our repo that depend on the spacetimedb package could depend on the TypeScript source files directly, rather than depending on a built version of the library. It makes dev slightly easier. If it's causing issues for downstream users though, that's obviously not good though. We'll look for a workaround internally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
NextJS 15 and 16 do not build without these development exports removed tho they funnily enough have different errors.

Upon removing the development export everything works like a charm.
I couldn't find any benefit of having them but maybe @cloutiertyler knows more why those are there in the first place🤷
This can be reproduced if you clone this repo i set up: https://github.com/kistz/spacetime-next-react-hooks
Since its a build error it shouldnt matter if you have the actual module running somewhere.
Step 1:
bun installStep 2:
bun devStep 3: observe that the error above is appearing (not good)
Step 3: Go into
node_modules/spacetimedb/package.jsonStep 4: Remove the
developmentfields under exports like in this prStep 5:
bun devStep 6: Profit. (should only be a connection error (aka nothing renders) at this point since the module your trying to connect to is missing)
API and ABI breaking changes
None
Expected complexity level and risk
1
Testing
Not a whole lot since i dont fully grasp the impact of this change but without it i cant even use the
spacetimedbpackage with NextJS and removing them fixes it.But even development scenarios are working just fine without it.