-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metro unstable_enablePackageExports
cause app crash
#3152
Comments
Hi, I've tried this in our sample app, but can't reproduce the errors. Would you be able to share a minimal reproducible example? |
Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed. |
Facing the same issue here.
const config = {
resolver: {
unstable_enablePackageExports: true,
},
};
module.exports = mergeConfig(getDefaultConfig(appDir), config);
import * as Sentry from '@sentry/react-native';
const routingInstrumentation = new Sentry.ReactNavigationInstrumentation();
Sentry.init({
dsn: 'my self hosted dsn',
autoInitializeNativeSdk: false,
integrations: [
new Sentry.ReactNativeTracing({
routingInstrumentation,
}),
]
});
export default Sentry.wrap(App) Here's the error:
and here's the stacktrace that I've been able to see:
At the end it seems like it's an error with import tslib from '../tslib.js';
const {
__extends,
__assign,
__rest,
__decorate,
__param,
__metadata,
__awaiter,
__generator,
__exportStar,
__createBinding,
__values,
__read,
__spread,
__spreadArrays,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
} = tslib; |
@krystofwoldrich, Can you please share the solution? |
I have managed to resolve the issue with the following patch: diff --git a/node_modules/tslib/package.json b/node_modules/tslib/package.json
index f8c2a53..633c4d2 100644
--- a/node_modules/tslib/package.json
+++ b/node_modules/tslib/package.json
@@ -29,7 +29,7 @@
"exports": {
".": {
"module": "./tslib.es6.js",
- "import": "./modules/index.js",
+ "_import": "./modules/index.js",
"default": "./tslib.js"
},
"./": "./" According to microsoft/tslib#143, microsoft/tslib#201 and microsoft/tslib#126, it does seem like the latest versions of I have verified that using "resolutions": {
"tslib": "2.6.0"
} |
unstable_enablePackageExports
cause app crash
We should add this to RN Troubleshooting docs. |
We have upgraded the |
OS:
Platform:
SDK:
@sentry/react-native
(>= 5.6.0)react-native
version: 0.72.0Are you using Expo?
Configuration:
(
@sentry/react-native
)I have following issue:
In One of the error files I found in the sentry's node module is ".../node_modules/@sentry/react-native/dist/js/client.js"
Steps to reproduce:
Actual result:
Facing above mentioned errors.
Expected result:
No Errors should be thrown.
The text was updated successfully, but these errors were encountered: