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

Unable to create a React project via bun create react <project> #5334

Closed
goosewin opened this issue Sep 14, 2023 · 2 comments
Closed

Unable to create a React project via bun create react <project> #5334

goosewin opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@goosewin
Copy link

What version of Bun is running?

1.0.1 31aec4ebe325982fc0ef27498984b0ad9969162b

What platform is your computer?

Darwin 22.5.0 arm64 arm

What steps can reproduce the bug?

Issue occurs on a fresh Bun install on M1 MacBook Pro (2020). I ran the following command:

bun create react project_name

What is the expected behavior?

A react project should be created

What do you see instead?

error: could not determine executable to run for package create-react

Additional information

No response

@goosewin goosewin added the bug Something isn't working label Sep 14, 2023
@nektro
Copy link
Contributor

nektro commented May 24, 2024

new output:

❯ bun-debug --bun create react project_name
The "react" template has been deprecated.
It is recommended to use "react-app" or "vite" instead.

To create a project using Create React App, run

  bun create react-app

To create a React project using Vite, run

  bun create vite

Then select "React" from the list of frameworks.
❯ bun-debug --bun create react-app project_name

Creating a new React app in /Users/meghandenny/src/test2/project_name.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

⠦debug warn: write(26[/Users/meghandenny/.npm/_cacache/tmp/1e9ad97b], 16384) blocked for 11.229ms

added 1489 packages in 1m

258 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 globalThis (/Users/meghandenny/src/test2/project_name/[eval]:3:26)
      at asyncFunctionResume (:1:21)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:1:21)
      at promiseReactionJob (:1:21)

Bun v1.1.10-debug (macOS arm64)

Aborting installation.
  node  has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Done.
❯ bun-debug --bun create vite                  
✔ Project name: … vite-project
✔ Select a framework: › Svelte
✔ Select a variant: › TypeScript

Scaffolding project in /Users/meghandenny/src/test2/vite-project...

Done. Now run:

  cd vite-project
  bun install
  bun run dev

@Jarred-Sumner Jarred-Sumner changed the title Unable to create a React project Unable to create a React project via bun create react <project> Aug 29, 2024
@Jarred-Sumner
Copy link
Collaborator

I don't think this is an issue anymore

if you're still running into this, please leave a comment

 bun create react project_name

The "react" template has been deprecated.
It is recommended to use "react-app" or "vite" instead.

To create a project using Create React App, run

  bun create react-app

To create a React project using Vite, run

  bun create vite

Then select "React" from the list of frameworks.

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants