codesandbox / codesandbox/codesandbox-client

Projects which depend on `typebox` cannot be transpiled

Open
#8,833 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

Projects which depend on typebox fail to compile and display the application when run in the Codesandbox client, but work as expected if you run the same project locally.

On codesandbox:

Image

Locally, after downloading the project and running:

Image

How has this issue affected you? What are you trying to accomplish?

Use a library which depends on data validation via typebox.

To Reproduce
  1. Create a new project using the default Typescript template
  2. Specify the latest parcel (2.16.1) and Typescript (5.9.3) versions in package.json.
  3. Add typebox as a dependency
  4. Use some Typebox code in the default index.ts
  5. Observe the above issue
Link to sandbox: link

I seem to be able to reproduce this issue using the old, deprecated version of the Parcel v1 bundler that is in the default template locally. Presumably this means this was an issue fixed in v2, but that change has not been adopted in whatever Codesandbox is doing to bundle packages.

Your Environment
Software Name/Version
Сodesandbox main-00f2e83
Browser 142.0.7444.162
Operating System MacOS Tahoe 26.1 (25B78)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox and its package.json, then reproduce the failure from index.ts using Parcel 2.16.1, TypeScript 5.9.3, and typebox. Compare this with the deprecated Parcel v1 setup described in the issue; done means a TypeScript project using typebox compiles and displays in the CodeSandbox client.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.