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

Open
drazisil-codecov opened this issue Mar 22, 2024 · 11 comments
Open

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

drazisil-codecov opened this issue Mar 22, 2024 · 11 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.

@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

@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!!

@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.

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
Status: No status
Development

No branches or pull requests

5 participants