question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't find variable: _globalSetter in expo

See original GitHub issue

Description

When I use react native reanimated v2 with expo I am getting some strange error.

Screenshots


ReferenceError: Can't find variable: _globalSetter
- node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError
- node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
- node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error
- node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
- node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException
- node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException
- node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
- node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:9:32 in ErrorUtils.setGlobalHandler$argument_0
- node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
- node_modules\regenerator-runtime\runtime.js:293:29 in invoke
- node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
- node_modules\regenerator-runtime\runtime.js:154:27 in invoke
- node_modules\regenerator-runtime\runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
- node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
- node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

Steps To Reproduce

I followed this docs to add reanimated with my expo app. https://docs.expo.io/versions/latest/sdk/reanimated/

  • “react”: “16.13.1”,
  • “react-native-gesture-handler”: “^1.9.0”,
  • “react-native-reanimated”: “2.0.0-rc.0”,
  • “react-native-redash”: “^16.0.5”,
  • NodeJS: v12.18.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
sanborN93commented, Feb 8, 2021

Got the same issues. What was the fix? Tried everything in here, nothing works.

EDIT: So i did the following to solve my issue.

I did everything mentioned here: https://docs.expo.io/versions/latest/sdk/reanimated/ Import is the babel.config!

Then i did: yarn add core-js@^3 yarn cache clean rm -r node_modules yarn expo start -c

3reactions
Jonatthucommented, Jan 13, 2021

@adityakmr7 @aca-hakan-pinar Follow the guide and do not forget the babel plugin https://docs.expo.io/versions/latest/sdk/reanimated/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't find variable: counter, in expo - Stack Overflow
Show activity on this post. The counter variable you are referring inside increment function doesn't refer to the state variable.
Read more >
[Solved]-Can't find variable: Expo-React Native
Coding example for the question Can't find variable: Expo-React Native. ... find variable: Expo-React Native. Search. score:0. import Expo from 'expo';.
Read more >
ReferenceError: Can't find variable: asdf : r/reactnative - Reddit
It doesn't like it. I'm trying to use two state variables. edit: this.setState({currentWord: this.state.asdf}).
Read more >
Render Error Can't find variable View Can't find ... - YouTube
In this Video,we try to fix the error like Render Error Can't find variable View. Render Error Can't find variable Text. Render Error...
Read more >
Can't find variable: __scanCodes in React Native Vision Camera
ReferenceError: Can't find variable : __scanCodesPlease do like share and comment if you like the video please do hit like and if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found