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

[Codegen] Unable to load the file tree from git: Error: Command failed: git ls-tree -r --name-only C #1196

Closed
jayvin opened this issue Aug 7, 2023 · 7 comments · Fixed by #1253

Comments

@jayvin
Copy link

jayvin commented Aug 7, 2023

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

npm 8.10.0

What version of Remix are you using?

1.19.1

Steps to Reproduce

Platform: Windows

npm create @shopify/hydrogen@latest

? Connect to Shopify:
√ Use sample data from Mock.shop (no login required)

? Where would you like to create your storefront?
√ hydrogen-latest

? Select a language:
√ TypeScript

? Select a styling library:
√ Skip and set up later

? Install dependencies with npm?
√ Yes

? Create a global h2 alias to run commands instead of npx shopify hydrogen ?
√ No

hydrogen-latest is ready to build.

? Do you want to scaffold routes and core functionality?
√ No, set up later (run npx shopify hydrogen setup)

Storefront setup complete!

cd .\hydrogen-latest
npm run dev

Warning
[Codegen] Unable to load the file tree from git: Error: Command failed: git ls-tree -r --name-only C
fatal: Not a valid object name C

Expected Behavior

Codegen should generate the storefrontapi.generated.d.ts correctly

Actual Behavior

Codegen is not working

@cwveysey
Copy link

cwveysey commented Aug 8, 2023

Confirmed that we started encountering the "[Codegen] Unable to load the file tree from git: Error: Command failed: git ls-tree -r --name-only C" error on Tuesday 8/8. Screenshot here.

@jayvin if we find a solution or encounter helpful details or information, we will report back and share them here.

Cc @dasabot

@trajce
Copy link

trajce commented Aug 8, 2023

We are also experiencing this issue.

@frandiox
Copy link
Contributor

Are you all running on Windows?

@cwveysey
Copy link

cwveysey commented Aug 14, 2023

@frandiox regarding the affected machines on our end, confirmed that they are running on Windows.

@cwveysey
Copy link

@jayvin @frandiox @trajce confirmed that the following unblocked our engineers that were experiencing this issue while working on Windows machines:

"Can you open your branch in a codespace instance? I'm thinking it should work there since it's Unix. I believe you should even be able to work on it locally inside of VS code but powered by the virtual machine in the cloud"

@trajce
Copy link

trajce commented Aug 14, 2023

Are you all running on Windows?

@frandiox Yes, we are working on windows, so the issue is probably windows path related.

@frandiox
Copy link
Contributor

@trajce @cwveysey @jayvin This should be fixed in the new release.
While I have your attention, a few questions:

  • Do you all use PowerShell for development on Windows instead of WSL or Git Bash?
  • If so, do you work with PS >= 7? Or lower version?
  • Are you using the h2 shortcut? If not, what's the reason? Didn't it work on your environment?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants