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

Setup with "@cloudflare/vitest-pool-workers"? #173

Open
tsteckenborn opened this issue Sep 25, 2024 · 3 comments
Open

Setup with "@cloudflare/vitest-pool-workers"? #173

tsteckenborn opened this issue Sep 25, 2024 · 3 comments

Comments

@tsteckenborn
Copy link

Hey there,

has someone a working setup in conjunction with "@cloudflare/vitest-pool-workers"?

I'm currently running in different issues, such as:

Failed to load url @opentelemetry/sdk-trace-base (resolved id: @opentelemetry/sdk-trace-base)

and / or:

No such module "Users/.../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/os".
  imported from "Users/.../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/HostDetectorSync.js"

I'd assume for now that it's due to some configurations on my end. If somebody has a working sample together with the vitest pool workers it would save me some time and I'd be grateful :)

@jahands
Copy link
Collaborator

jahands commented Sep 25, 2024

I believe this issue is related to cloudflare/workers-sdk#6581

@evanderkoogh
Copy link
Owner

Yeah.. that certainly seems like a similar issue indeed. And not sure if there is anything I could do to fix that in this library.

If the issue is only in @opentelemetry/sdk-trace-base and not in @opentelemetry/api, or if you do not do any manual instrumentation, you should be able to test the handler without the instrument calls.

@jahands
Copy link
Collaborator

jahands commented Sep 30, 2024

Came up with a workaround: cloudflare/workers-sdk#6581 (comment)

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

No branches or pull requests

3 participants