Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
9.5
Framework Version
Remix 2.11.2
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- In a remix projects server file, or any route file
// app/routes/repro.tsx
import * as Sentry from "@sentry/remix";
Sentry.captureException("test 123")
- run build
$ pnpm remix vite:build
# or
$ pnpm shopify hydrogen build
You will see a warning
app/routes/repro.tsx (3:7): "captureException" is not exported by "node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@open_iuiv3pujvl5pfv746jgqtaej4m/node_modules/@sentry/remix/build/esm/index.client.js", imported by "app/routes/repro.tsx".
We also get similar warnings for startSpan
, getTraceData
, setContext
, setUser
- Open
dist/server/index.js
and search for "test 123" and you will see the captureException compiled away
(void 0)("test 123")
Expected Result
The sentry functions are compiled into the server bundle.
Actual Result
The sentry functions turn into (void 0)
and our application becomes unusable.
Metadata
Metadata
Assignees
Type
Projects
Status
No status