Closed kevduc closed 1 year ago
Hi @kevduc thanks for reporting and for the detailed issue description! We'll take a look at this.
Thank you! Also step 2 in the reproduction steps might be ambiguous, what I meant is "Create a new Next.js project locally on your computer" e.g. with npx create-next-app@latest
(and not: create a Next.js sentry project in your sentry account)
Environment
@sentry/wizard version: 3.9.2 | sentry-cli version: 1.75.2 Windows 10
Steps to Reproduce
npx @sentry/wizard@latest -i nextjs
Sentry SaaS (sentry.io)
forAre you using Sentry SaaS or self-hosted Sentry?
Yes
toDo you already have a Sentry account?
Expected Result
I landed on https://sentry.io/for/nextjs/ (from a google search), it says it's a one line setup with
npx @sentry/wizard@latest -i nextjs
. I already had a sentry account, but without any projects in it, I expected the wizard to create the sentry project in my account for me, but it errors out in that case.Actual Result
Additional information
It seems to be related to https://github.com/getsentry/sentry-wizard/issues/26
The wizard should probably ask the user if they want to create a sentry project, and create the project for them, or at least let them know they need to first create a project in sentry (maybe give them a url).
The error itself comes from
@clack/core
(theoptions
parameter forSelectPrompt
called here is mistyped, see https://github.com/natemoo-re/clack/issues/144), but is pretty much separate from the current issue, i.e. in any case, the wizard should handle the case when the project array is empty, and not prompt the user to select from an empty list of projects.