“error: Error: Unable to resolve module missing-asset-registry-path from C:UsersUSERDesktoppicky_anu_anshifnode_modulesreact-nativeLibrariesLogBoxUILogBoxImageschevron-right.png: missing-asset-registry-path could not be found within the project or in these directories:”
When I updated my rn from 0.72.5 to 0.74.2, I received this issue from React Native. The build completed sucess, but then this problem showed up.
Files:
package.json-
{
"name": "Picky_Assist",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-community/cli-platform-ios": "^11.3.5",
"@react-native-community/netinfo": "^9.4.1",
"@react-native-community/progress-view": "^1.4.1",
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/app": "^16.5.1",
"@react-native-firebase/messaging": "^16.5.1",
"@react-navigation/drawer": "^6.5.7",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@reduxjs/toolkit": "^1.9.5",
"axios": "^1.2.3",
"crypto-js": "^4.1.1",
"deprecated-react-native-prop-types": "^4.2.3",
"package": "^1.0.1",
"react": "18.2.0",
"react-native": "0.74.2",
"react-native-base64": "^0.2.1",
"react-native-camera": "^4.2.1",
"react-native-date-picker": "^4.3.3",
"react-native-device-info": "^10.7.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.16.2",
"react-native-gradle-plugin": "^0.71.19",
"react-native-linear-gradient": "^2.7.3",
"react-native-permissions": "^3.10.1",
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-scanner": "^1.5.5",
"react-native-reanimated": "^3.4.1",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "^4.6.4",
"react-native-screens": "^3.22.1",
"react-native-simple-toast": "^3.3.1",
"react-native-snackbar": "^2.6.2",
"react-native-splash-screen": "^3.3.0",
"react-native-toast-message": "^2.2.0",
"react-native-webview": "^11.26.1",
"react-redux": "^8.1.1",
"redux": "^4.2.1",
"redux-persist": "^6.0.0",
"toggle-switch-react-native": "^3.3.0"
},
"reactNativePermissionsIOS": [
"Camera",
"MediaLibrary",
"Microphone",
"Notifications",
"PhotoLibrary",
"PhotoLibraryAddOnly"
],
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.84",
"@react-native/eslint-config": "^0.74.84",
"@react-native/metro-config": "^0.74.84",
"@react-native/typescript-config": "0.74.84",
"@types/crypto-js": "^4.1.1",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.2.6",
"@types/react-native-push-notification": "^8.1.1",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "^2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"resolutions": {
"react-native-permissions": "^3.8.0"
},
"overrides": {
"react-native-qrcode-scanner": {
"react-native-permissions": "^3.8.0"
}
}
}
metro.config.json-
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
App.tsx-
import { StyleSheet, Text, View } from 'react-native'
import React from 'react'
const App = () => {
return (
<View>
<Text>App</Text>
</View>
)
}
export default App
const styles = StyleSheet.create({})
babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'react-native-reanimated/plugin',
],
};
i have deleted nodemodule and reinstalled
gradlew clean