t3-oss / create-t3-app

The best way to start a full-stack, typesafe Next.js app
https://create.t3.gg
MIT License
24.35k stars 1.11k forks source link

bug: Unable to run Installation Command #1910

Open razorftw opened 1 month ago

razorftw commented 1 month ago

Provide environment information

System: OS: Windows 11 10.0.22631 CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor Memory: 15.92 GB / 31.90 GB Binaries: Node: 21.6.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD bun: 1.1.12 - ~.bun\bin\bun.EXE

Describe the bug

Unable to scaffold the app, when running the command bun create t3-app@latest I get the following error

C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\strip-ansi\index.js:2 const ansiRegex = require('ansi-regex'); ^

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\ansi-regex\index.js from C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\strip-ansi\index.js not supported. Instead change the require of C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\ansi-regex\index.js in C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\strip-ansi\index.js to a dynamic import() which is available in all CommonJS modules. at Object. (C:\Users\walke\AppData\Local\Temp\bunx-602161551-create-t3-app@latest\node_modules\strip-ansi\index.js:2:19) { code: 'ERR_REQUIRE_ESM' }

Node.js v21.6.0

Reproduction repo

Blank Directory

To reproduce

bun create t3-app@latest

Additional information

No response

juliusmarminge commented 3 weeks ago

can you reproduce this on an LTS version of Node?