Is there an existing issue for this?
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/@sentry+remix@9.5.0_@opentelemetry+context-async-hooks@1.30.1_@opentelemetry+api@1.9.0__@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
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.
Is there an existing issue for this?
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
$ pnpm remix vite:build # or $ pnpm shopify hydrogen buildYou will see a warning
We also get similar warnings for
startSpan,getTraceData,setContext,setUserdist/server/index.jsand search for "test 123" and you will see the captureException compiled awayExpected Result
The sentry functions are compiled into the server bundle.
Actual Result
The sentry functions turn into
(void 0)and our application becomes unusable.