I get an expo application from a client. Did all the needed instalations (npm install, pod install, etc...) and when I try to run a npm expo start within the iOS simulator, the bundle is ok, but Im getting this weird error:
iOS Bundling complete 59850ms
ERROR Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I have tried all the reset caches, watchman, etc... But still getting. This is driving me crazy. Any lights here?
Running mac os ventura on a MacbookPro intel.
Related
I am a newbie on React-native and I am facing some issues. My metro bundler successfully bundles the react native app. after that these errors occur:
ReferenceError: Can't find variable: Buffer
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
and getting a blank white screen on my emulator as shown: Emulator White Screen
here is a picture from Package.json devDependencies: package.json devDependencies
here are the dependencies from package.json:
any solution will be appreciated.
thanks in advance
I have tried almost all solutions from different resources but unable to fix them.
Please try to update the pusher-js version with 7.4.0. It's working fine for me.
"pusher-js": "^7.4.0",
I'm able to successfully run the starter "AwesomeProject" react-native app on both iOS and Android.
I have a private repo project that was built by an outsourced team that I'm trying to get running on my local Macbook Pro with an M1 Chip. The team claims they are able to get the project running on a normal Macbook Pro (without the M1 chip).
I'm unable to build the project on iOS and get the following error:
The following build commands failed: SwiftEmitModule normal arm64
Emitting\ module\ for\ Charts (in target 'Charts' from project 'Pods')
(1 failure)
When I try to run the Android app I'm able to get it to run on the Android Device simulator but get the following errors from
ERROR Error: token is not a valid string
ERROR Invariant
Violation: Module AppRegistry is not a registered callable module
(calling runApplication). A frequent cause of the error is that the
application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR
Invariant Violation: Module AppRegistry is not a registered callable
module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I'm not sure how to further debug these issues. I followed some of the debugging I saw with M1 Macbooks and React-Native like using "brew" to install cocoapods and then always using "alias pod='arch -x86_64 pod'" for the pod command. I see lots of other hacks to make react-native work on M1 like this article: https://goxotech.medium.com/apple-m1-react-native-was-not-exactly-what-we-thought-but-that-is-not-an-issue-6c8d359926df
try adding this in your PodFile
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
I ran into a problem connecting web3 to a React Native app.
Initially, the connection was made according to this guide.
Everything worked, but as soon as I restart the application, an error appears:
ReferenceError: Property 'Buffer' doesn't exist, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered
callable module (calling runApplication). A frequent cause of the
error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine:
hermes
Then I comment on these lines in Live reloading mode
const Web3 = require('web3')
const web3Rospen = new Web3('https://ropsten.infura.io/v3/myKey')
I save the code, the application works, again, in Live reloading mode, I uncomment these lines back - the application works.
But initially, just taking and running the application from web3 does not work. Maybe someone faced such a problem?
Versions:
"react-native": "0.66.4",
"web3": "^1.7.3"
I'm trying to develop an application with React Native, every now and then, I get this error:
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
with no further explanation.
Today the application worked fine, I accidentally had a letter written outside of a functional component, I had an error of course, deleted the extra letter and then I got this error.
Nothing seems to fix this error this time.
I tried closing the server, clearing cache, running the application again, deleted node_modules and did npm install again, nothing works. I have no idea what could go wrong, the application worked fine, and after that letter the application just won't run.
Any ideas? What causes this error?
I'm trying to upgrade React-native from 0.61.5 to 0.63.2.
For iOS everything is ok. But for Android I've got:
Current errors while building bundle:
ERROR TypeError: Super expression must either be null or a function
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
White screen on emulator
I deleted the app, cleaned the solution - not working.
Updated by this manual: https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.63.2
I fixed the problem by updating dependencies and devDependencies to the latest versions. I guess the better solution would be to find out what exactly one needed to be update. But the main thing for now is that app finally runs :)