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

🐛 Bug: Crashes if run without a logged-in gh user #1971

Closed
3 tasks done
JoshuaKGoldberg opened this issue Mar 7, 2025 · 4 comments · Fixed by #1972
Closed
3 tasks done

🐛 Bug: Crashes if run without a logged-in gh user #1971

JoshuaKGoldberg opened this issue Mar 7, 2025 · 4 comments · Fixed by #1972
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

Running npx create-typescript-app when the user either doesn't have gh installed or is logged out (gh auth logout) should still work. There should be a warning in Bingo about not being able to create a repo, but that's it.

Actual

npx create-typescript-app --directory cta-auth-test
┌  ✨ [email protected] ✨
│
●  Learn more on:
│    https://github.com/JoshuaKGoldberg/create-typescript-app
│
◇  Running with mode --setup using the template:
│    create-typescript-app
│
■  Error inferring default options from system:
│
■  TypeError: Cannot read properties of undefined (reading 'avatar_url')
│      at readAllContributors (file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/create-typescript-app/lib/options/readAllContributors.js:16:24)
│      at runNextTicks (node:internal/process/task_queues:65:5)
│      at listOnTimeout (node:internal/timers:555:9)
│      at process.processTimers (node:internal/timers:529:7)
│      at async Promise.all (index 2)
│      at async awaitLazyProperties (file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/bingo/lib/utils/awaitLazyProperties.js:21:5)
│      at async prepareOptions (file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/bingo/lib/preparation/prepareOptions.js:23:12)
│      at async file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/bingo/lib/cli/setup/runModeSetup.js:40:16
│      at async tryCatchError (file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/bingo/lib/utils/tryCatch.js:3:16)
│      at async runSpinnerTask (file:///Users/josh/.npm/_npx/4aa729db9999bfc4/node_modules/bingo/lib/cli/display/runSpinnerTask.js:6:20)
│
●  Tip: to run again with the same input values, use: npx bingo --directory cta-auth-test --directory cta-auth-test
│
■  Error: Cannot read properties of undefined (reading 'avatar_url')
│
└  Operation cancelled. Exiting - maybe another time? 👋

Additional Info

I think there'll also be an underlying bug in Bingo as well. But we can't get that far because default options inference in the CTA layer is crashing.

Reported by Nate May on Bluesky: https://bsky.app/profile/natemay.bsky.social/post/3ljqx5jklyc2b

🎁

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :( labels Mar 7, 2025
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

🎉 This is included in version v2.4.2 🎉

The release is available on:

Cheers! 📦🚀

@JoshuaKGoldberg
Copy link
Owner Author

@allcontributors add @natepmay for bug

Copy link
Contributor

@JoshuaKGoldberg

I've put up a pull request to add @natepmay! 🎉

@natepmay
Copy link

natepmay commented Mar 7, 2025

Thank you! I can confirm that that's the same error I got.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(
Projects
None yet
2 participants