You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run:bun --bun create react-app my-react-app on terminal
Errors and doesn't create anything inside the directory (my-react-app) except package-lock.json
What is the expected behavior?
Should work, without errors
Should generate all the necessary files
Should install all dependencies with its latest stable versions (e.g. react 19) using bun
What do you see instead?
Currently outputs:
Creating a new React app in<pwd>/react-app-19-bun-cli.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
⠏
added 1326 packages in 19s
268 packages are looking for funding
run `npm fund`for details
1 |
2 | const init = require('react-scripts/scripts/init.js');
3 | init.apply(null, JSON.parse(process.argv[1]));
^
SyntaxError: JSON Parse error: Unrecognized token '/'
at <pwd>/react-app-19-bun-cli/[eval]:3:31
Bun v1.2.0 (macOS arm64)
Aborting installation.
node has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Done.
Additional information
Currently next-app is working fine with bun. Below is an output from my machine.
❯ bun --bun create next-app next-app-bun-app-with-bun-cli
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like your code inside a `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to use Turbopack for`next dev`? … No / Yes
✔ Would you like to customize the import alias (`@/*` by default)? … No / Yes
Creating a new Next.js app in<pwd>/next-app-bun-app-with-bun-cli.
Using bun.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- postcss
- tailwindcss
- eslint
- eslint-config-next
- @eslint/eslintrc
bun install v1.2.0 (b0c5a765)
+ @eslint/eslintrc@3.2.0
+ @types/node@20.17.17 (v22.13.1 available)
+ @types/react@19.0.8
+ @types/react-dom@19.0.3
+ eslint@9.20.0
+ eslint-config-next@15.1.6
+ postcss@8.5.1
+ tailwindcss@3.4.17 (v4.0.6 available)
+ typescript@5.7.3
+ next@15.1.6
+ react@19.0.0
+ react-dom@19.0.0
360 packages installed [2.52s]
Initialized a git repository.
Success! Created next-app-bun-app-with-bun-cli at <pwd>/next-app-bun-app-with-bun-cli
The text was updated successfully, but these errors were encountered:
reilly@mac trash % bun --bun create react-app my-react-app
Creating a new React app in /Users/reilly/programming/forks/bun/trash/my-react-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
added 1326 packages in 20s
268 packages are looking for funding
run `npm fund`for details
1 |
2 | const init = require('react-scripts/scripts/init.js');
3 | init.apply(null, JSON.parse(process.argv[1]));
^
SyntaxError: JSON Parse error: Unrecognized token '/'
at /Users/reilly/programming/forks/bun/trash/my-react-app/[eval]:3:31
the root cause of this issue is #12209 because its overwriting the first argument with the "path", the node exec (bun in this case) now doesn't have the ability to read it.
What version of Bun is running?
1.2.0
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
bun
globallybun --bun create react-app my-react-app
on terminalpackage-lock.json
What is the expected behavior?
bun
What do you see instead?
Currently outputs:
Additional information
Currently
next-app
is working fine withbun
. Below is an output from my machine.The text was updated successfully, but these errors were encountered: