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

Running the Wizard with Bun #446

Closed
HazAT opened this issue Sep 12, 2023 · 12 comments
Closed

Running the Wizard with Bun #446

HazAT opened this issue Sep 12, 2023 · 12 comments

Comments

@HazAT
Copy link
Member

HazAT commented Sep 12, 2023

If I run a local build of the Wizard with Bun 1.0 it works

Mostly - there is an issue with clack where it gets stuck in project selection
suddenly stops taking input
image
bombshell-dev/clack#159

when I run it with npx
bunx @sentry/wizard@latest

I get an error

/private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/index.js:4
  global.fetch = require('node-fetch')
                 ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/node_modules/node-fetch/src/index.js from /private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/index.js not supported.
Instead change the require of /private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/node_modules/node-fetch/src/index.js in /private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/private/tmp/@sentry/wizard@latest--bunx/node_modules/r2/index.js:4:18)
    at Object.<anonymous> (/private/tmp/@sentry/wizard@latest--bunx/node_modules/@sentry/wizard/dist/lib/Steps/OpenSentry.js:62:10)
    at Object.<anonymous> (/private/tmp/@sentry/wizard@latest--bunx/node_modules/@sentry/wizard/dist/lib/Steps/index.js:6:20)
    at Object.<anonymous> (/private/tmp/@sentry/wizard@latest--bunx/node_modules/@sentry/wizard/dist/lib/Setup.js:87:25)
    at Object.<anonymous> (/private/tmp/@sentry/wizard@latest--bunx/node_modules/@sentry/wizard/dist/bin.js:28:15) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v20.2.0
error: "sentry-wizard" exited with code 1 (SIGHUP)
@Lms24
Copy link
Member

Lms24 commented Sep 13, 2023

I just tried bunx @sentry/wizard@latest and with the sourcemaps wizard flow, setting up the Vite plugin in a Vite+React app. No error message so far 🤔 Does this still happen with [email protected]?

@AbhiPrasad
Copy link
Member

The bun wizard should add @sentry/cli to package.json trusted dependencies. https://bun.sh/docs/cli/install#trusted-dependencies

See getsentry/sentry-javascript-bundler-plugins#412

@Lms24
Copy link
Member

Lms24 commented Oct 2, 2023

@AbhiPrasad good point, opened a separate issue to track.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@HazAT
Copy link
Member Author

HazAT commented Oct 31, 2023

bad bot

@HazAT HazAT reopened this Oct 31, 2023
@Lms24
Copy link
Member

Lms24 commented Oct 31, 2023

@HazAT is this still an issue? I couldn't reproduce it back then and the trustedDependencies task is tracked separately in #476.

@HazAT
Copy link
Member Author

HazAT commented Nov 21, 2023

I haven't tried it tbh - someone just needs to run the wizard with Bun - but let's close it and see if it comes up again

@HazAT HazAT closed this as completed Nov 21, 2023
@braydend
Copy link

braydend commented Apr 4, 2024

I'm still having this issue. I was able to run npx @sentry/wizard@latest -i sveltekit (Node v21) as a workaround and it seems to have worked

@Lms24
Copy link
Member

Lms24 commented Apr 4, 2024

@braydend thanks for letting us know! Did you run the wizard with the latest bun version?

@Lms24 Lms24 reopened this Apr 4, 2024
@braydend
Copy link

braydend commented Apr 4, 2024

@braydend thanks for letting us know! Did you run the wizard with the latest bun version?

These are the versions I am using:
Bun: 1.0.2
Sveltekit: ^2.0.0
Svelte: 5.0.0-next.33

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

Lms24 commented Apr 4, 2024

Can you try updating Bun to the latest version? According to bombshell-dev/clack#170 (comment) there was a bug that might be causing the issue and it was fixed in Bun 1.0.18.

@HazAT
Copy link
Member Author

HazAT commented May 13, 2024

tried it with Bun 1.1.8 and latest version of the wizard - it works now

@HazAT HazAT closed this as completed May 13, 2024
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
Development

No branches or pull requests

4 participants