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

npx create-turbo@latest - strange error starting from scratch #9013

Closed
1 task done
lukeocodes opened this issue Aug 15, 2024 · 1 comment
Closed
1 task done

npx create-turbo@latest - strange error starting from scratch #9013

lukeocodes opened this issue Aug 15, 2024 · 1 comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@lukeocodes
Copy link

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

Occurs when using npx create-turbo

What package manager are you using / does the bug impact?

npm, pnpm, Yarn v1

What operating system are you using?

Windows

Which canary version will you have in your reproduction?

@latest (2.0.13) and @canary (2.0.13-canary.1)

Describe the Bug

When I run npx create-turbo@latest on my Windows machine, I get the following error.

$ npx create-turbo@latest
? Where would you like to create your Turborepo? ./social
? Which package manager do you want to use? npm

>>> no "package.json" found at C:\Users\...\Projects\...\social

If I use npm to initialise the package in that directory first, I get the following error

$ npx create-turbo@latest
? Where would you like to create your Turborepo? ./social
>> social (C:\Users\...\Projects\...\social) has 1 conflicting file - please try a different location

To summarise;

  • To a fresh path that does not exist, create-turbo will create the directory and then error because of no package.json found
  • To an existing path, create-turbo will error because of no package.json
  • To an existing path with a package.json, create-turbo will error because there is a conflicting package.json (it can only be that, it is otherwise an empty directory)

Expected Behavior

When I run npx create-turbo@latest on my Windows machine, it creates a new directory set up as a turborepo

To Reproduce

Open a new shell and run:

npx create-turbo@latest

Then follow the prompts you see in your terminal. Select yarn/npm/pnpm (I verified it occurs with all 3).

Additional context

I tried this in "Command Prompt" and "git-bash" on windows

@lukeocodes lukeocodes added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Aug 15, 2024
@chris-olszewski
Copy link
Member

This should be fixed by #9014 which is now released in 2.0.14.

Please use npx [email protected] as sometimes npx create-turbo@latest will not fetch the most recent version if it has already done it recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

2 participants