Repository navigation
Node ESM import fix (#88): db 0.7.2, storage 0.4.1, auth 0.7.5 - #89
Merged
Merged
Conversation
Importing @frostbase-dev/db/client or /admin, or @frostbase-dev/storage/client, in Node without a bundler threw ERR_MODULE_NOT_FOUND (issue #88). The packages are "type": "module", but the agents compiled with module es2022 + moduleResolution node, so tsc emitted extensionless relative specifiers ('./schemas') that Node's ESM resolver refuses. Wrangler and every bundler paper over that, which is why nothing in our stack noticed; the README's server example was simply broken. auth/admin, db/drizzle and storage/admin only loaded by luck - no relative runtime imports. All three agents now build with nodenext, like the CLI, and every relative import carries its .js extension. nodenext makes tsc reject an extensionless import (TS2835), so the quality job's per-agent typecheck now guards this. tsx (unit tests) and wrangler's esbuild both map .js to .ts, so dev, tests and the Worker bundles are unchanged. Verified by packing all three packages into a clean consumer and importing every Node-facing subpath. Fixes #88
So the extensions added for #88 do not read as noise someone tidies away.
Ships the Node ESM import fix (#88): db/client, db/admin and storage/client threw ERR_MODULE_NOT_FOUND outside a bundler. Auth carries the same extension change, so it ships too to keep its published files matching source.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
frostbase-dev-preview | 58b6600 | Nov 15 2026, 04:58 PM |
This branch was successfully deployed
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.
Fixes #88.
@frostbase-dev/db/client,db/adminandstorage/clientthrewERR_MODULE_NOT_FOUNDin plain Node: the agents compiled withmoduleResolution: node, emitting extensionless relative imports that Node's ESM resolver rejects.nodenext(like the CLI); all relative imports carry.js, and the per-agent typecheck in CI rejects an extensionless one.🤖 Generated with Claude Code