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

The setup wizard fails when used with pnpm and workspaces #553

Closed
drazisil-codecov opened this issue Mar 22, 2024 · 15 comments
Closed

The setup wizard fails when used with pnpm and workspaces #553

drazisil-codecov opened this issue Mar 22, 2024 · 15 comments
Assignees

Comments

@drazisil-codecov
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create a monorepo with pnpm
  2. Run Sentry wizard
  3. Select pnpm

Expected Result

Sentry wizard is able to complete setup

Actual Result

pnpm add command fails due to missing -w flag to allow for top-level install

Product Area

Unknown

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link

getsantry bot commented Mar 22, 2024

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link

getsantry bot commented Mar 22, 2024

Routing to @getsentry/product-owners-projects-project-creation for triage ⏲️

@lforst lforst transferred this issue from getsentry/sentry Mar 25, 2024
@lforst
Copy link
Member

lforst commented Mar 26, 2024

Generally speaking, the wizard shouldn't be ran in the root of a workspace - I guess this is a docs issue we need to resolve.

@michael-ravelhq
Copy link

Generally speaking, the wizard shouldn't be ran in the root of a workspace - I guess this is a docs issue we need to resolve.

@lforst - It doesn't only fail when running in the root of the project.
I have a monorepo using turborepo. my node api server has dependencies in the workspace.

I am getting the following error:

│  Error: Command failed: npm add @sentry/esbuild-plugin
│  npm ERR! code EUNSUPPORTEDPROTOCOL
│  npm ERR! Unsupported URL Type "workspace:": workspace:*

This is probably caused by the wizard using npm instead of pnpm.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 21, 2024
@lforst
Copy link
Member

lforst commented Apr 22, 2024

@michael-ravelhq Did the wizard not ask you which package manager you are using?

@michael-ravelhq
Copy link

michael-ravelhq commented Apr 22, 2024 via email

@andrewchen30
Copy link

I think we enocunter the same issue

CleanShot 2024-06-12 at 01 51 35@2x

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jun 11, 2024
@Lms24
Copy link
Member

Lms24 commented Jun 12, 2024

@michael-ravelhq the wizard looks at lock files to determine which package manager to use. Any chance that you have a package-lock.json floating around that the wizard could pick up instead of the pnpm-lock.yaml?

@andrewchen30 can you re-run the wizard with the --debug argument? I think this might reveal some additional error logs that could help here

@andrewchen30
Copy link

No information even if we use --debug

CleanShot 2024-06-13 at 17 11 46@2x

BTW, I manually installed the @sentry/nextjs@^8 package to fix the issue. Our senty work properly for now. I guess it's fine for us right now.

Thanks for the quick reply!!

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jun 13, 2024
@Lms24
Copy link
Member

Lms24 commented Jun 13, 2024

Oh I see. But yeah it's probably the same cause.

Did you run the wizard in the root of your monorepo or in the package where the SDK should be installed? We generally recommend running it in the project directory.

@andrewchen30
Copy link

Oh I see. But yeah it's probably the same cause.

Did you run the wizard in the root of your monorepo or in the package where the SDK should be installed? We generally recommend running it in the project directory.

No, I runned it on the project-directory level. I am also wondering why it happened, might be some pnpm setupj confused the wizard.

@lforst
Copy link
Member

lforst commented Aug 2, 2024

@andrewchen30 @michael-ravelhq We have just released a new version of the wizard that will be a bit more sensible in workspace roots and also emit a log file when the installation command goes wrong. Feel free to try it out, and if it continues failing it would be cool if you could share the logfile with us. Thanks!

@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Aug 2, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Aug 2, 2024
@drazisil-codecov
Copy link
Author

Sorry, didn't mean to kick it back, I was pinging myself a reminder.

@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Aug 2, 2024
@andrewchen30
Copy link

@andrewchen30 @michael-ravelhq We have just released a new version of the wizard that will be a bit more sensible in workspace roots and also emit a log file when the installation command goes wrong. Feel free to try it out, and if it continues failing it would be cool if you could share the logfile with us. Thanks!

Just tested, it's fixed!!! Thanks a lot!

Image

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Aug 3, 2024
@lforst
Copy link
Member

lforst commented Aug 5, 2024

@andrewchen30 awesome, thanks for checking, closing this issue then. If there continue to be problems with this issue let us know.

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

No branches or pull requests

5 participants