Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun.build fails with Threlte #18122

Open
pekeler opened this issue Mar 12, 2025 · 1 comment · May be fixed by #18150
Open

Bun.build fails with Threlte #18122

pekeler opened this issue Mar 12, 2025 · 1 comment · May be fixed by #18150
Assignees
Labels
bug Something isn't working bundler Something to do with the bundler confirmed bug We can reproduce this issue

Comments

@pekeler
Copy link

pekeler commented Mar 12, 2025

What version of Bun is running?

1.2.5+013fdddc6

What platform is your computer?

Darwin 24.3.0 arm64 arm

What steps can reproduce the bug?

Bun.build can't resolve Threlte, even though it was added and installed properly.

  1. set up a simple Svelte project as described here feat: support Svelte in bundler and dev server #17735
  2. bun add three @threlte/core
  3. edit App.svelte and add import { Canvas } from "@threlte/core"; to the script part, and <Canvas/> to the html part
  4. (optionally confirm Threlte has been installed to node_modules)
  5. bun run build.ts

What is the expected behavior?

Using other npm packages such as lodash seems to work fine, so the expectation is that Threlte also just works.

What do you see instead?

4 | import { Canvas } from "@threlte/core";
                           ^
error: Could not resolve: "@threlte/core". Maybe you need to "bun install"?
    at /private/tmp/svelte-bun-test/src/App.svelte:4:24

Bun v1.2.5 (macOS arm64)

Additional information

Threlte is a Svelte wrapper for Three.js, so it shouldn't require any special build support. It works as expected when using vite as bundler.

@pekeler pekeler added bug Something isn't working needs triage labels Mar 12, 2025
@pekeler
Copy link
Author

pekeler commented Mar 12, 2025

@RiskyMH RiskyMH added bundler Something to do with the bundler and removed needs triage labels Mar 12, 2025
@DonIsaac DonIsaac self-assigned this Mar 13, 2025
@DonIsaac DonIsaac added the confirmed bug We can reproduce this issue label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bundler Something to do with the bundler confirmed bug We can reproduce this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants