Quick Start example fails when using Bun #433
Send to my agentWhich project does this relate to?#
Router
Describe the bug#
Following documentation for initialize a new TanStack Router project using Bun is throwing an error.
- Reference: https://tanstack.com/router/latest/docs/quick-start
- Command:
bunx @tanstack/cli create --router-only - Error:
SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
Your Example Website or App#
N/A
Steps to Reproduce the Bug or Issue#
- Check if last Bun runtime is installed and in path (version reference: 1.3.11)
- Try to create a new project with documentation example:
bunx @tanstack/cli create --router-only - See the console throwing the error.
SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)
Expected behavior#
I expect the project to be created correctly as if I creating it with npm or pnpm.
Screenshots or Videos#
No response
Platform#
- Router / Start Version: latest
- OS: macos Tahoe 26.5
- Hardware: Macbook Air M1
- Browser: N/A
- Bundler: bun
- Bundler version: 1.3.11
Additional context#
No response
renatodantas(GitHub profile, opens in a new tab) changed the title
The problem was occurring because I was using Node 16 as default in NVM. When I switched to Node 24 as my main Node installation, the error disappear. Does it should rely on current installed Node for creating Bun projects?
tannerlinsley closed this
Sign in to join this conversation.
cannot reproduce this with bun 1.3.12