-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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
TypeError: undefined is not an object (evaluating 'ReactCurrentActQueue$1.isBatchingLegacy') #34079
Comments
This probably means that, for whatever reason, React 18 is not being used despite being set in the dependencies. For me, I had resolutions set up to use React 17 in the root package.json of my lerna monorepo. |
Is this happening on a fresh project?
Could you provide a proper repro? |
|
Yes, on a fresh project. I created a new one with this versions: I got this issue only with the last version of react and/or react native. It's probably on my side. |
Personally this should still be open. I have created a new project using the latest CLI and I am getting the same problem. It looks like having Expo 45 with "react-native":"^0.69.0" is causing the problem Warning: Invalid version react-native@0.69.0 for expo sdkVersion 45.0.0. Use react-native@0.68.2 Even though using 0.68.2 has vulnerability and the recommended solution is going to 0.69.0. The error by using 0.68.2 I get is
|
@cortinico Was hoping to get some input unless preferable to start a new issue thank you |
I don't think Expo is already compatible with RN 0.69 so this is sort of expected |
I have node js version 16.15.1, react-native 0.69.1 and expo 45. I'm learning to use react and only when I use es npm install -g expo-cli, it throws me many errors. Any solution? |
so what exactly is the solution to this Error? |
Facing the same issue. Please help. |
I have created a new project and it worked |
I think this is a version compatibility issue. When I had the same error, I downgraded to this RN version: "npm install react-native@0.68.2 --force". And it worked for me. |
I had to do something more drastic, by upgrading react 17->18.2.0 and react-native 0.64->0.69.1, like so: Changes to: I was then able to run the native base typescript template |
I'm glad it worked for you.. Happy Learning :) |
It's works for me |
I'ts works for me, thanks a lot! |
"react": "18.2.0", "react-native": "0.69.3", Solved the issue for me |
This worked for me. Thanks a lot! |
Adding this to my {
"resolutions": {
"react": "18.0.0"
}
} No need to downgrade anything. You can also set that |
Still having this issue after trying all of the above solutions. I'm running an Expo |
Upgrading |
Changes to: |
## docs fixes - improve setup of project - remove not working scripts and urls - I managed to get Android example app to work, but unfortunately not the iOS, see notes bellow: ## update `IAPExample` React to `18.2.0` - because of `TypeError: undefined is not an object (evaluating 'ReactCurrentActQueue$1.isBatchingLegacy')` - see here: facebook/react-native#34079 ## iOS exampke currently not buildable because of: - because of obsolete pods: ``` $ yarn pods rbenv: pod: command not found The `pod' command exists in these Ruby versions: 2.7.4 ``` - see here: facebook/react-native#38921 fixed but then build failed ``` The following build commands failed: CompileC /Users/babu/Library/Developer/Xcode/DerivedData/IapExample-ddzasbbwninhdjgvtldlfwsnfkwf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/json.o /Users/babu/work/powerful-medical/dev/react-native-iap/IapExample/ios/Pods/RCT-Folly/folly/json.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods') (1 failure) ``` -> this needs more time and investigation, and the question is, is it worth the time? - anyway added warning for anybody trying to build it regarding this README --------- Co-authored-by: hyochan <dooboolab@gmail.com>
## docs fixes - improve setup of project - remove not working scripts and urls - I managed to get Android example app to work, but unfortunately not the iOS, see notes bellow: ## update `IAPExample` React to `18.2.0` - because of `TypeError: undefined is not an object (evaluating 'ReactCurrentActQueue$1.isBatchingLegacy')` - see here: facebook/react-native#34079 ## iOS exampke currently not buildable because of: - because of obsolete pods: ``` $ yarn pods rbenv: pod: command not found The `pod' command exists in these Ruby versions: 2.7.4 ``` - see here: facebook/react-native#38921 fixed but then build failed ``` The following build commands failed: CompileC /Users/babu/Library/Developer/Xcode/DerivedData/IapExample-ddzasbbwninhdjgvtldlfwsnfkwf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/json.o /Users/babu/work/powerful-medical/dev/react-native-iap/IapExample/ios/Pods/RCT-Folly/folly/json.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods') (1 failure) ``` -> this needs more time and investigation, and the question is, is it worth the time? - anyway added warning for anybody trying to build it regarding this README --------- Co-authored-by: hyochan <dooboolab@gmail.com>
Description
Since this morning, I cannot launch my app in debug mode on Android.
My app build successfully but, I got this in metro:
`
BUNDLE ./index.js
LOG Running "MyApp" with {"rootTag":1}
ERROR TypeError: undefined is not an object (evaluating 'ReactCurrentActQueue$1.isBatchingLegacy')
ERROR TypeError: undefined is not an object (evaluating 'ReactCurrentActQueue$1.isBatchingLegacy')
`
My app has a blank page.
This is my dependencies:
"dependencies": { "@react-native-masked-view/masked-view": "^0.2.6", "@react-navigation/bottom-tabs": "^6.3.1", "@react-navigation/native": "^6.0.10", "@react-navigation/native-stack": "^6.6.2", "@react-navigation/stack": "^6.2.1", "react": "18.0.0", "react-native": "0.69.0", "react-native-gesture-handler": "^2.4.2", "react-native-pager-view": "^5.4.15", "react-native-safe-area-context": "^4.2.5", "react-native-screens": "^3.13.1", "react-native-svg": "^12.3.0", "react-native-tab-view": "^3.1.1", "react-native-vector-icons": "^9.1.0" },
I tried to downgrade/updgrade some dependencies (react and react-native in particular) but nothing works.
Also tried to clear cache from metro, gradlew...
Thanks for your help :)
Version
0.69.0
Output of
npx react-native info
System:
OS: macOS 12.4
CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
Memory: 370.74 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.16.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.12 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 16.0.1 - /Library/Java/JavaVirtualMachines/jdk-16.0.1.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.0 => 0.69.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
npm i
npx react-native run-android
Snack, code example, screenshot, or link to a repository
Maybe, use this configuration
"dependencies": { "@react-native-masked-view/masked-view": "^0.2.6", "@react-navigation/bottom-tabs": "^6.3.1", "@react-navigation/native": "^6.0.10", "@react-navigation/native-stack": "^6.6.2", "@react-navigation/stack": "^6.2.1", "react": "18.0.0", "react-native": "0.69.0", "react-native-gesture-handler": "^2.4.2", "react-native-pager-view": "^5.4.15", "react-native-safe-area-context": "^4.2.5", "react-native-screens": "^3.13.1", "react-native-svg": "^12.3.0", "react-native-tab-view": "^3.1.1", "react-native-vector-icons": "^9.1.0" },
The text was updated successfully, but these errors were encountered: