getsentry / profiling-node

The code for this repo now lives in https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node
MIT License
29 stars 10 forks source link

Next.js using profiling-node on latest version (1.0.4) of this package #164

Closed dkryptr closed 1 year ago

dkryptr commented 1 year ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

SDK Version

1.0.4

Link to Sentry event

No response

What environment is your node script running in?

Next.js

How is your code deployed and bundled?

Deploying using Vercel. Next.js as the bundler.

Steps to Reproduce

  1. Create a Next.js project from scratch
  2. Implement Next.js Sentry integration based on documentation
  3. Implement the new profiling feature for Next.js in the sentry.server.config.js file
  4. Start the dev server

I haven't tested these steps to reproduce, but I assume the same issue will occur.

Expected Result

Next.js runs local development environment

Actual Result

Next.js local dev run errors out.

Screenshot 2023-06-13 171809

sshah98 commented 1 year ago

got the same thing

dkryptr commented 1 year ago

@JonasBa Bringing this to your attention.

JonasBa commented 1 year ago

@dkryptr this seems to be yet another breaking change in esm behavior which fails at recognizing .node files (cjs does and everything work fine)

I will likely fully remove esm support as it has been only a headache so far, as a workaround, can you tell me if importing the CJS build via import {ProfilingIntegration} from "@sentry/profiling-node/lib/index.js" works?

JonasBa commented 1 year ago

Just to get back to this, we removed esm support due of this issue. If you upgrade to latest version it should no longer break