Repository navigation
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.13.0
Framework Version
@shopify/hydrogen 2025.1.3 , vite ^6.2.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/jasonloeve/hydrogen-sentry
Steps to Reproduce
- Install a fresh instance of Hydrogen 2025.1.3
- Install Sentry following the guild set out in -https://docs.sentry.io/platforms/javascript/guides/remix/frameworks/hydrogen/
- Run build using
npm run buildusing node v21.7.0 / npm 10.5.0 - Build throws and error
Expected Result
Expected build to complete successfully.
To note that Hydrogen has just pushed updates switching from Vite 5 to Vite 6, this this update this issue has been present.
Actual Result
Build fails with error, seems to be failing at entry.client.tsx , @sentry/remix
Error: Failed to resolve entry for package "@sentry/remix". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@sentry/remix" package at packageEntryFailure (file:///Users/Sites/hydrogen-remix/source/node_modules/vite/dist/node/chunks/dep-DG3BLbPj.js:16195:15) at resolvePackageEntry (file:///Users/Sites/hydrogen-remix/source/node_modules/vite/dist/node/chunks/dep-DG3BLbPj.js:16190:5) at tryNodeResolve (file:///Users/Sites/hydrogen-remix/source/node_modules/vite/dist/node/chunks/dep-DG3BLbPj.js:16057:18) at Object.resolveId (file:///Users/Sites/hydrogen-remix/source/node_modules/vite/dist/node/chunks/dep-DG3BLbPj.js:15828:19) at Object.handler (file:///Users/Sites/hydrogen-remix/source/node_modules/vite/dist/node/chunks/dep-DG3BLbPj.js:46392:15) at file:///Users/Sites/hydrogen-remix/source/node_modules/rollup/dist/es/shared/node-entry.js:22188:40 at PluginDriver.hookFirstAndGetPlugin (file:///Users/Sites/hydrogen-remix/source/node_modules/rollup/dist/es/shared/node-entry.js:22070:28) at resolveId (file:///Users/Sites/hydrogen-remix/source/node_modules/rollup/dist/es/shared/node-entry.js:20552:26) at ModuleLoader.resolveId (file:///Users/Sites/hydrogen-remix/source/node_modules/rollup/dist/es/shared/node-entry.js:20988:15) at Object.resolveId (/Users/Sites/hydrogen-remix/source/node_modules/@remix-run/dev/dist/vite/plugin.js:964:22)
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsWaiting for: Community
Activity
s1gr1d commentedon Apr 24, 2025
Thanks for opening this issue and for providing a reproduction!
It seems to be an issue with Vite 6. If you downgrade the version it works. But we still have to look into why Sentry is failing with the Vite 6 setup.
s1gr1d commentedon Apr 24, 2025
I added a PR to fix our exports in the
package.json. However, Vite 6 made some changes forresolve.conditions(docs here) and it could be that this is also a Vite 6 bug.With the fixed exports, the error you posted is gone, but Remix itself shows the following error:
Our package exports look fine - we distinguish between browser and node.
@jasonloeve Would you be so kind and update your reproduction example to the latest Sentry version once the PR is released in the next version? Then I would open an issue in the Vite repository.
fix(remix): Add ESM-compatible exports (getsentry#16124)
github-actions commentedon Apr 29, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #16124, which was included in the 9.15.0 release.