React-native error in react-native-vector-icons module/MaterialIcons - react-native

When i try to run app react-native-vector-icons modules gives following error.
Error: While resolving module `react-native-vector-icons/MaterialIcons`,
the Haste package `react-native-vector-icons` was found.
When i uninstall package my project works fine.

Run this command :
rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json
And restart packager

Related

error while running "sanity init" command in a Next.js project, failed at "Resolving dependencies"

I tried to run sanity init in a Next.js project and got the following error:
Error message image:
Try to use npm install or yarn install.

React native compile error on resolving module

I can't compile my project because of this error.
Unable to resolve module #react-navigation/core from
node_modules\#react-navigation\native\src\createAppContainer.js:
When I run I encounter with this problem. Can anybody help me?
Sometimes such error occurs as the package-json.lock file which locks the version.
So do 1 thing remove the version of #react-navigation and all related dependencies from your package.json and after that do following once again
npm install #react-navigation/native --save
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view --save
Must help!
This error means that either you haven't installed the react-navigation module or that you have installed the module but didn't re-built your project using react-native run-android or react-native run-ios.
Following these steps should solve your issue:
Install react-navigation module.
Re-build your project.
Restart the packager by stopping the current packager and then
starting the packager again
with react-native start.

Error While run react-native run-ios. Error: Cannot find module 'metro-config'

I am running React-native Project by terminal using react-native run-is command. I want to run it in simulator. first I run npm install ,then react-native run-ios. It showing error
Error: Cannot find module 'metro-config'
Require stack:
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/util/Config.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/core/index.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cliEntry.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cli.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/cli.js
- /usr/local/lib/node_modules/react-native-cli/index.js
You seem to have no Metro-config module installed. Install this module.
npm i metro-config --save-dev

Errors when trying to run react-native on ios

so I developed an app in react-native, already runs and tested on Android, but now its the ios part.
I'm working with react native version 0.60.3, on MacOS, using yarn as package manager.
I'm running "react-native start --reset cache".
then running "react-native run-ios:" on a separate console,
and getting this error:
"
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening app.xcworkspace.
....
error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference(...))
"
so then im trying to run with Xcode and i get this error on the "react-native start --reset-cache" console:
"
Error: Unable to resolve module ./index from /Users/nono/work/myapp/.: The module ./index could not be found from /Users/nono/work/myapp/.. Indeed, none of these files exist:
* /Users/nono/work/app/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
"
and this error on the iphone simulator :
I'm desperate ... please help!
UPDATE:
now the first error doesn’t occur.
I only get the "Unable to resolve './index' ... "
error
Try to run the following commands on terminal:
npm install
cd ios; pod install; cd../
react-native link
try this:
Stop the MetroBundler/launchPackager
Delete node_modules
rm -rf node_modules
Change the version on your package.json
from
"react-native": "0.59.1",
to
"react-native": "0.58.6",
Then clean the watchman
watchman watch-del-all
Run npm install again:
npm install
And try to run your project, in my case:
react-native run-ios
My bad. I accidentally deleted the index.js ..

I am getting "Unable to resolve module `react

i am getting the below error.
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
Body:
{"from":"D:\AwesomeProject\index.android.js","to":"react","message":"Unable to resolve module react from D:\\AwesomeProject\\index.android.js: Module does not exist in the module map or in these directories:\n D:\AwesomeProject\node_modules\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache.","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]}
onResponse
DevServerHelper.java:332
execute
RealCall.java:126
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1112
run
ThreadPoolExecutor.java:587
run
Thread.java:818
{"from":":\\AwesomeProject\\index.android.js","to":"react","message":"Unable to resolve module `react`
i tried every workaround given by the log still it's not working..
Check whether the folder named react exists inside node_modules named folder or not, and if it is not there then,
stop the server and again install 'react'
npm install react --save
after the installation please restart the sever by reseting the cache
npm start --reset-cache
Then run your application
Try
npm install
hopefully this resolve
There is a problem with the node module i had to remove the node module and add then i had to downgrade the the React-Native Library and Run the command react-native start and then react-native run-android after that it worked for me.