error: bundling failed: ReferenceError: Module not registered in graph - react-native

i am a newbe in react native
i don't know what is going on with my apps
the node said "error: bundling failed: ReferenceError: Module not registered in graph"
please helpenter image description here

This error usually occurs when you install a new module (while packager is open).
Firstly you can try close your packager and run react-native run-ios. If this approach does not help, you can try delete node modules directory and npm install again. But i believe first approach will work.

Related

ReferenceError: Can't find variable: W4r in React Native

After adding the new files from a different folder I got this error:
ReferenceError: Can't find variable: W4r
ERROR Invariant Violation: "main" has not been registered. This can happen if:
Metro (the local dev server) is running from the wrong folder. Check if Metro is running, stop it, and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
I did not find the "W4r" in anywhere in my code
Remove node_modules folder
Install dependencies (npm i)
Close android emulator & close metro window
cd android && gradlew clean
npx react-native start --reset-cache
After "Metro" opens, close it
npm run android
I try this when my env no respond, hope its help you.

Error: Requiring module "node_modules\expo-media-library\build\MediaLibrary.js",

I made a react native project using react-native init newProject .I wanted to use expo modules in the project in this module so I ran npx install-expo-modules to use expo modules after using this command I installed expo module expo-media-library and when I import this
Error: Requiring module "node_modules\expo-media-library\build\MediaLibrary.js", which threw an exception:
TypeError: undefined is not an object (evaluating '_ExponentMediaLibrary.default.MediaType')
go with npm install expo-media-library or yarn add expo-media-library
try expo upgrade then expo doctor. mine also stucked there for a while. it even causes AppRegistry error that said main is not registered. should've tried with older versions

Error initialising the React Native awsomeProject via the CLI

I am trying to get the basic react native app from https://reactnative.dev/docs/environment-setup running via the CLI, but I am getting errors. I have node, python2 and jdk8 installed. I have all the Android Studio components installed as far as I can tell. I've added the environment variables.
When I run npx react-native init AwesomeProject to initialise the project, I get green ticks next to Downloading Template, Copying Template and Processing Template, but a red cross next to Installing dependencies. The error below that states Error: command failed: npm install. And further down after some warnings it states npm ERR! Unexpected end of JSON input while parsing near '...anbul":"0.4.5","mocha'
And in the initialised app folder there are no node modules.
Any idea how I get this working?
Hi the solution for this is to clear your cache :)
Please run the following command and retry:
npm cache clean --force

ReferenceError: Unknown plugin "babel-plugin-transform-builtin-extend"

I am trying to run exercises on exercism but I am getting this error ReferenceError: Unknown plugin "babel-plugin-transform-builtin-extend" whenever I am trying to run the test with npm install below is my package.json file and the error log. What do I need to do?
Thank you.
I was able to put the link on github gist
I ran this command npm i babel-plugin-transform-builtin-extend on the terminal and it solved my problem. Thanks all

react-native reazy unable to resolve module

I am trying to test out the reazy react-native framework, I can't get the sample app up and running.
when I run the react-native run-ios command i am getting the following error:
unable to resolve module react/lib/reactComponentwithPureRenderMixing
node_modules/react-native-router-flux/node_modules/react-addons-pure-render-mixin/index.js
Module does not exist in the module map
I have removed my modules and reinstalled them. the module folder is there for react-native-router-flux
nothing in the JS console
any help is appreciated
Please install router flux using below and refresh
npm install --save react-native-router-flux
Hope! this helps.
Run the following command and it will be solved-
yarn add react-addons-pure-render-mixin
this is manual step to add this module.