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

Sentry wizard fails to install when yarn is not available on host #576

Open
luisitoguanes opened this issue May 31, 2024 · 6 comments
Open

Comments

@luisitoguanes
Copy link

Environment

Wizard Version: 3.22.3
Don't have yarn installed

Steps to Reproduce

  1. run npx @sentry/wizard@latest -i sourcemaps

Expected Result

Installation would be successful

Actual Result

◇ Installation failed.

■ Encountered the following error during installation:

│ Error: Command failed: yarn add @sentry/cli
│ /bin/sh: yarn: command not found

@Lms24
Copy link
Member

Lms24 commented Jun 4, 2024

Hey @luisitoguanes thanks for writing in! Can you share a little bit more context? Which kind of project did you call the source maps wizard in? And just to confirm, would you have expected that npm was called instead of yarn?

Generally, we try to auto detect the package manager by checking for the respective lock files in the project. In case we can't auto-detect lock files, we fall back to npm as the default package manager. I'm not sure why in your case it selected yarn but we'll find it out :)

@luisitoguanes
Copy link
Author

hi @Lms24. Sure, I'm working on a react cra app, using always npm, didn't even have yarn installed.

But, now that you mention this, I do have a yarn.lock file as well (weirdly being updated somehow when I install something using npm 🤷‍♂️) sorry for creating an issue for that 😅

@Lms24
Copy link
Member

Lms24 commented Jun 5, 2024

Ahh that makes sense indeed 😅

No worries! I'll leave this issue open because we should probably give you a way to override the package manager selection. I'm currently thinking of a CLI argument to accomplish this.
Will backlog for now though.

@Lms24
Copy link
Member

Lms24 commented Jun 5, 2024

Just to confirm: are you blocked by this or can you work around the issue for now?

@luisitoguanes
Copy link
Author

I just installed @sentry/cli with npm manually and then run the wizard again. I didn't have any other issue.
Sorry that I didn't put all this on the issue to begin with

@Lms24
Copy link
Member

Lms24 commented Jun 6, 2024

No worries! Just glad you got it working :)

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

No branches or pull requests

2 participants