expo / sentry-expo

MIT License
202 stars 83 forks source link

6.2.0 breaks expo-web #340

Closed foloinfo closed 1 year ago

foloinfo commented 1 year ago

Summary

I just updated sentry-expo from 6.1.1 -> 6.2.0 and this will cause errors on expo web.

I tried upgrading related modules but still no luck. Reverting to 6.1.1 works fine.

web compiled with 2 errors
ERROR in ./node_modules/@sentry/react-native/dist/js/sdk.js 117:16
Module parse failed: Unexpected token (117:16)
File was processed with these loaders:
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|     const RootApp = (appProps) => {
|         var _a;
>         return (<TouchEventBoundary {...((_a = options === null || options === void 0 ? void 0 : options.touchEventBoundaryProps) !== null && _a !== void 0 ? _a : {})}>
|         <ReactNativeProfiler {...profilerProps}>
|           <RootComponent {...appProps}/>

ERROR in ./node_modules/@sentry/react-native/dist/js/touchevents.js 22:16
Module parse failed: Unexpected token (22:16)
File was processed with these loaders:
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|      */
|     render() {
>         return (<View style={touchEventStyles.wrapperView}
|         // eslint-disable-next-line @typescript-eslint/no-explicit-any
|         onTouchStart={this._onTouchStart.bind(this)}>

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Web

SDK Version (managed workflow only)

48

Environment

expo-env-info 1.0.5 environment info: System: OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish) Shell: 5.8.1 - /usr/bin/zsh Binaries: Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn npm: 9.3.0 - ~/.nvm/versions/node/v16.19.0/bin/npm Watchman: 4.9.0 - /usr/bin/watchman npmPackages: @expo/webpack-config: ^18.1.0 => 18.1.0 expo: ~48.0.19 => 48.0.19 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 react-native: 0.71.8 => 0.71.8 react-native-web: ~0.18.10 => 0.18.12 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

npx expo install sentry-expo@~6.2.0
yarn start -w
kbrandwijk commented 1 year ago

Thank you for the report. We will look into this!