react-native-reanimated: [Web]ReferenceError: _frameTimestamp is not defined
Description
Get this error when upgrading react-native-reanimated
to v2.9.0+
on the web (v2.8.0
works), it works fine on iOS and Android.

Expected behavior
Works on the web.
Actual behavior & steps to reproduce
web not working when upgrading to v2.9.0+
.
Snack or minimal code example
https://github.com/tamagui/starters/tree/main/next-expo-solito
Package versions
name | version |
---|---|
react-native | 0.68.2 |
react-native-reanimated | 2.9.1 |
NodeJS | 16.15.1 |
Xcode | 13.4.1 |
Java | |
Gradle | |
expo | 45.0.2 |
Affected platforms
- Android
- iOS
- Web
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 26 (2 by maintainers)
Commits related to this issue
- Ensure global objects initialization for web (#3418) ## Description The PR with tree shaking moved global objects initialization for web to another file and then imported it into the `index` file ... — committed to software-mansion/react-native-reanimated by piaskowyk 2 years ago
- Ensure global objects initialization for web (#3418) The PR with tree shaking moved global objects initialization for web to another file and then imported it into the `index` file (`import './reanim... — committed to software-mansion/react-native-reanimated by piaskowyk 2 years ago
- Ensure global objects initialization for web (#3418) ## Description The PR with tree shaking moved global objects initialization for web to another file and then imported it into the `index` file ... — committed to wordpress-mobile/react-native-reanimated by piaskowyk 2 years ago
- ui: Add tap gesture - Note: There's a bug with the Reanimiated lib; applying fix found at https://github.com/software-mansion/react-native-reanimated/issues/3355#issuecomment-1518942329 — committed to letam/expo-react-native-app-tutorial-2023 by letam a year ago
- Fix: resolving the timestamp bug existing in react-native-reanimated lib https://github.com/software-mansion/react-native-reanimated/issues/3355 — committed to zoldyzdk/hello-native by zoldyzdk a year ago
We’re still having this issue
Stick the following at the top of
_app.tsx
, outside the component definition:@prateem use this instead:
@WillenOLeal I fixed it, but this hasn’t been released yet. I want to release the new version this week.
I’m also facing this issue, on 2.9.1 on web.
For example, in this repo (not minimal): https://github.com/tamagui/starters/tree/main/next-expo-solito
Has anyone found a solution?
Same problem with simple react-native-web project with library v2.9.1 and react-native v0.69.1. Error is in “styleUpdater” function:
Seems quick workaround is to add
window._frameTimestamp = null
on top of the component file =)Add window._frameTimestamp = null on top of the component file
Bump
Bump