fix: point @objectstack/metadata exports to compiled dist files#976
Merged
fix: point @objectstack/metadata exports to compiled dist files#976
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/environment-variables |
The package.json main, types, and exports fields were pointing to TypeScript source files (src/index.ts, src/node.ts) instead of compiled dist output. Node.js cannot import .ts files at runtime, causing ERR_MODULE_NOT_FOUND on Vercel Studio deployment. - Updated package.json exports to reference dist files (.js, .mjs, .d.ts) - Added local tsup.config.ts with both entry points (index.ts, node.ts) - Added files field to package.json for publishable assets Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/e381b2da-4f5d-4848-8ffb-d11c8123a6c1
Copilot
AI
changed the title
[WIP] Fix module not found error in Vercel Studio
fix: point @objectstack/metadata exports to compiled dist files
Mar 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes @objectstack/metadata runtime import failures in Node/Vercel by ensuring the package’s main, types, and exports resolve to compiled dist/* artifacts rather than TypeScript source files.
Changes:
- Repointed
packages/metadata/package.jsonmain/types/exportstodistoutputs and restricted published contents viafiles. - Added a local
packages/metadata/tsup.config.tswith both entry points (src/index.ts,src/node.ts) and updated the build script to use it. - Documented the fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/metadata/tsup.config.ts | Adds a package-local tsup config to build both index and node entrypoints into dist/. |
| packages/metadata/package.json | Updates runtime/type entrypoints and exports to compiled output; adds files and switches build script to local tsup config. |
| CHANGELOG.md | Notes the Vercel ERR_MODULE_NOT_FOUND fix for @objectstack/metadata exports. |
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.
@objectstack/metadatapackage.json hadmain,types, and allexportspointing to TypeScript source files (src/index.ts). Node.js can't import.tsat runtime, causingERR_MODULE_NOT_FOUNDon Vercel.Changes
packages/metadata/package.json— Rewired all export paths to dist output, addedfilesfield, matching the established@objectstack/specpattern:packages/metadata/tsup.config.ts(new) — Local tsup config with both entry points (src/index.ts,src/node.ts), since the root config only declares a single entryCHANGELOG.md— Documented the fixOriginal prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.