After upgrading to the latest React Native + react-native-reanimated, running the app in development gives a very unhelpful invalid expression error without specifying what the expression is. The line number is very large, so will be pointing to the minified index bundle.
Trying to fetch the bundle via curl results in a more useful error (see below). Disabling minify on the URL results in a successful response, so the problem likely lies with minification.
Downgrading to v2 of this library worked to get past this JS error, but it is not officially supported with RN v0.75. And Android will only compile with v3.15 of this library, so downgrading isn't an option for now.
Description
After upgrading to the latest React Native + react-native-reanimated, running the app in development gives a very unhelpful
invalid expression
error without specifying what the expression is. The line number is very large, so will be pointing to the minified index bundle.Trying to fetch the bundle via curl results in a more useful error (see below). Disabling
minify
on the URL results in a successful response, so the problem likely lies with minification.This is a similar error to https://github.com/software-mansion/react-native-reanimated/issues/6170 but not sure if related. Clearing everything as described in the issue didn't work, and it also happens on multiple dev machines.
All package versions (e.g. babel) are as listed in the RN upgrade tool. See https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.75.3/RnDiffApp/package.json. Babel plugin for this library has been added, etc.
Downgrading to v2 of this library worked to get past this JS error, but it is not officially supported with RN v0.75. And Android will only compile with v3.15 of this library, so downgrading isn't an option for now.
Steps to reproduce
curl "http://localhost:8081/index.bundle?platform=ios&dev=true&minify=true"
Snack or a link to a repository
https://github.com/software-mansion/react-native-reanimated/blob/main/packages/react-native-reanimated/src/threads.ts
Reanimated version
3.15.3
React Native version
0.75.3
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Paper (Old Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Device model
No response
Acknowledgements
Yes