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

Next.js with Turbopack: Error importing pure TS packages #15963

Closed
ctjlewis opened this issue Dec 23, 2024 · 2 comments
Closed

Next.js with Turbopack: Error importing pure TS packages #15963

ctjlewis opened this issue Dec 23, 2024 · 2 comments
Labels
crash An issue that could cause a crash macOS An issue that occurs on macOS

Comments

@ctjlewis
Copy link

ctjlewis commented Dec 23, 2024

How can we reproduce the crash?

From vercel/next.js#74252. Mostly not your bug I don't think, Bun doesn't struggle to resolve this, but something to look into re. the segfault. Wanted to copy here just in case, but probably upstream from Turbopack.


Repro here:

https://github.com/ctjlewis/nextjs-ts-package

It attempts to load this simple mock package:

https://github.com/ctjlewis/ts-package-example


When Bun is used with Turbo, we get a segfault:

Bun v1.1.41 ([`b8f28ed`](<https://github.com/oven-sh/bun/tree/b8f28ed8afd1c2b60568b2b0158d39a674178027>)) on macos aarch64 [AutoCommand]

Segmentation fault at address 0x4000000002B

- *10 unknown/js code*

<!-- from bun.report: etViGWlalFX_NMfe5SXL -->

<sub>Sentry Issue: <strong><a href="https://bun-p9.sentry.io/issues/5298323857/">BUN-85</a></strong></sub>

Relevant log output

Bun Canary v1.1.41-canary.29 (b8f28ed8) macOS Silicon
macOS v15.1
Args: "/Users/lewis/.bun/bin/bun" "/Users/lewis/Development/nextjs-ts-package/node_modules/next/dist/server/lib/start-server.js"
Features: http_server jsc transpiler_cache(17) tsconfig tsconfig_paths process_dlopen 
Builtins: "bun:jsc" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:constants" "node:crypto" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:stream/web" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "ws" "node:v8" "node:http2" "node:diagnostics_channel" 
Elapsed: 4032ms | User: 4880ms | Sys: 797ms
RSS: 0.47GB | Peak: 0.47GB | Commit: 1.05GB | Faults: 2318

Stack Trace (bun.report)

Bun v1.1.41 (b8f28ed) on macos aarch64 [AutoCommand]

Segmentation fault at address 0x4000000002B

  • 10 unknown/js code

Sentry Issue: BUN-85

@ctjlewis ctjlewis added the crash An issue that could cause a crash label Dec 23, 2024
@ctjlewis ctjlewis changed the title Next.js with Turbopack: Next.js with Turbopack: Error importing pure TS packages Dec 23, 2024
@github-actions github-actions bot added the macOS An issue that occurs on macOS label Dec 23, 2024
@ctjlewis
Copy link
Author

ctjlewis commented Dec 23, 2024

Purely a Next/Turbopack thing, turns out. Closing.

vercel/next.js#74252 (comment)

@ctjlewis
Copy link
Author

@Jarred-Sumner, last notif today:

I eventually got this working with full Bun global fancy stuff, bun --bun next dev/build is stable for Vercel's AI Chatbot template on latest (vercel/ai-chatbot@50fbc0d), even using experimental partial prerendering, generally a very advanced example that would be good to examine issues in, but none.

So Next parity is coming along very, very well FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash macOS An issue that occurs on macOS
Projects
None yet
Development

No branches or pull requests

1 participant