Sentry-react-native: dsn module removed in 5.10.0 but used by the current @sentry/react-native package

Created on 5 Dec 2019  路  8Comments  路  Source: getsentry/sentry-react-native

None of the initial categories asked applies. The app fails to build since 5.10.0 upgrade due to a missing dsn package. Perhaps the dsn was removed and the react-native package is behind, or files were removed unexpectedly. Details are as follows:

Package + Version

@sentry/react-native + 1.1.0
this package @ 5.10.0 (dependency of the package above)

Version:

5.10.0

Description

The latest version of the @sentry/react-native package @1.1.0 made an update to use "^5.9.0" which was working great until the release of sentry-javascript's "5.10.0" release today.

Every since that time building the app with sentry throws the following issue:
bundling failed: Error: Unable to resolve module./dsnfrom/Users/x/x/mobile/reactnative/node_modules/@sentry/core/dist/index.js: The module./dsncould not be found from/Users/x/x/mobile/reactnative/node_modules/@sentry/core/dist/index.js. Indeed, none of these files exist:

The functionality had been working fine for both android and iOS, and was reporting to sentry for a week and now today the app fails to initialize.

The sentry related code in the app is simply the following:

package.json
"dependencies": { ... "@sentry/react-native": "1.1.0", ...

App/index.js
Sentry.init({ dsn: config.sentry.dsn, //config obj pulled earlier in the file environment: __DEV__ ? "development" : "production"

Let me know if you would like any additional information. For the meantime will look into using older version of the @sentry/react-native package. Thanks in advance as well.

Regards

Most helpful comment

I am still seeing this same issue in 1.2.0. I work in a monorepo, and we are using the following versions of sentry:

@sentry/browser - 5.10.0
@sentry/core - 5.10.0
@sentry/node - 5.10.0

error: bundling failed: Error: Unable to resolve module ./dsn from node_modules/@sentry/core/dist/index.js

We also tried bumping all of our other sentry packages to 5.10.1, did not solve

All 8 comments

This may belong in the react-native repo, but a little follow up info:

Screen Shot 2019-12-04 at 5 50 05 PM

Sorry about that, 1.2.0 is on the way bumping the dependencies.
It's still strange though that this happens at all, can you delete your node_modules folder and try again?

Sorry about that, 1.2.0 is on the way bumping the dependencies.
It's still strange though that this happens at all, can you delete your node_modules folder and try again?

Deleting does not help, waiting for 1.2.0

Yeah I tried deleting and reinstalling a few times to no avail. Will look out for 1.2.0

1.2.0 has been released

Thanks I can confirm this is resolved in 1.2.0

I am still seeing this same issue in 1.2.0. I work in a monorepo, and we are using the following versions of sentry:

@sentry/browser - 5.10.0
@sentry/core - 5.10.0
@sentry/node - 5.10.0

error: bundling failed: Error: Unable to resolve module ./dsn from node_modules/@sentry/core/dist/index.js

We also tried bumping all of our other sentry packages to 5.10.1, did not solve

Make sure to completely wipe node_modules and all build artifacts, this is just a caching issue.

Was this page helpful?
0 / 5 - 0 ratings