Skip to content
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

Missing-asset-registry-path for @react-navigation/elements/lib/commonjs/assets/back-icon-mask.png on RN 70.6 #11192

Closed
4 of 14 tasks
boostvolt opened this issue Feb 3, 2023 · 21 comments

Comments

@boostvolt
Copy link

Current behavior

When building my app I get the following error message since I switched to React Native 70.6 (Android and iOS), without @react-navigation everything works. On React Native 69.7, the app runs without problems with the identical @react-navigation versions.

Error: Unable to resolve module missing-asset-registry-path from /node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon-mask.png: missing-asset-registry-path could not be found within the project or in these directories:
  node_modules
> 1 | �PNG
  2 | 
  3 | 
  4 | IHDR2���gAMA��
                    �a cHRMz&�����u0�`:�p��Q<bKGD���̿tIME�
    at ModuleResolver.resolveDependency (/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:178:15)
    at DependencyGraph.resolveDependency (/node_modules/metro/src/node-haste/DependencyGraph.js:264:43)
    at Object.resolve (/node_modules/metro/src/lib/transformHelpers.js:170:21)
    at resolveDependencies (/node_modules/metro/src/DeltaBundler/graphOperations.js:466:33)
    at processModule (/node_modules/metro/src/DeltaBundler/graphOperations.js:232:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async addDependency (/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18)
    at async Promise.all (index 18)
    at async processModule (/node_modules/metro/src/DeltaBundler/graphOperations.js:279:3)
    at async addDependency (/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18)

Expected behavior

The build should pass successfully.

Reproduction

bare react-native project

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-bottom-tabs
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view
  • flipper-plugin-react-navigation

Environment

  • I've removed the packages that I don't use
package version
@react-navigation/native 6.1.3
@react-navigation/stack 6.3.12
react-native-safe-area-context 4.5.0
react-native-screens 3.19.0
react-native-gesture-handler 2.9.0
react-native-reanimated 2.14.4
react-native 70.6
expo 47.0.13
node 18.12.1
npm or yarn 8.19.2
@boostvolt boostvolt added the bug label Feb 3, 2023
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link, a www.typescriptlang.org/play link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

A repro will help us debug the issue. The issue will be closed automatically after a while if you don't provide a repro.

@bananer
Copy link

bananer commented Mar 29, 2023

@boostvolt could you fix the problem? It occurs for me with a different package (react-native-calendars), and this is the only good result when googling for the error message.

@github-actions
Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

@naeliofreires
Copy link

naeliofreires commented Mar 29, 2023

@bananer @boostvolt

Could you fix the problem guys? I am this right now

Unable to resolve module missing-asset-registry-path from ProjectName/src/assets/images/logo.png: missing-asset-registry-path could not be found within the project or in these directories: node_modules

@EmanoelLoreto
Copy link

EmanoelLoreto commented May 9, 2023

I'ma with the same error:

..\..\modules\linxpay\dependencies\react-native-linxtef-module\src\assets\remove-card.gif: native\apps\assistenteVendas\node_modules\react-native\Libraries\Image\AssetRegistry could not be found within the project.

Did someone already fix that?

@nth-zik
Copy link

nth-zik commented Jun 23, 2023

The same on me on react-native 0.71.10 and 0.72.0

@saurabhbakolia
Copy link

The same error I am getting. I don't know, but when I installed the react-native-svg-transfer. This error started.

@tohshine
Copy link

tohshine commented Jul 6, 2023

This is a bug from the latest version of React Native and the issue is caused by the react-native-svg library installed, what works for me so I installed the previous version of react-native.

@VijayMFinGlide
Copy link

This is a bug from the latest version of React Native and the issue is caused by the react-native-svg library installed, what works for me so I installed the previous version of react-native.

"react-native": "^0.70.0" is working for me ... Thanks tohshine

@aikhan
Copy link

aikhan commented Jan 15, 2024

This is a bug from the latest version of React Native and the issue is caused by the react-native-svg library installed, what works for me so I installed the previous version of react-native.

Were you able to fix it other than by downgrading. I need to be on 0.73 and this problem persists.

@VijayMFinGlide
Copy link

This is a bug from the latest version of React Native and the issue is caused by the react-native-svg library installed, what works for me so I installed the previous version of react-native.

Were you able to fix it other than by downgrading. I need to be on 0.73 and this problem persists.

Unfortunately, no I am still running with "react-native": "^0.70.0"

@gorgon
Copy link

gorgon commented Jan 22, 2024

+1

@0xlethe
Copy link

0xlethe commented Jan 23, 2024

+1 for 0.73

2 similar comments
@iSaBo96
Copy link

iSaBo96 commented Jan 27, 2024

+1 for 0.73

@dancosta-fed
Copy link

+1 for 0.73

@Alexandra-Rdrgs
Copy link

+1 for 0.73.

@dancosta-fed
Copy link

dancosta-fed commented Jan 30, 2024

This answer here has worked for me:

 * Metro configuration for React Native
 * https://github.com/facebook/react-native
 *
 * @format
 */

const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');

const defaultConfig = getDefaultConfig(__dirname);

const {
  resolver: { sourceExts, assetExts },
} = getDefaultConfig(__dirname);

const config = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
    babelTransformerPath: require.resolve('react-native-svg-transformer'),
  },
  resolver: {
    assetExts: assetExts.filter(ext => ext !== 'svg'),
    sourceExts: [...sourceExts, 'svg'],
  },
};

module.exports = mergeConfig(defaultConfig, config);

I got it from[Leslie-Wong-H]: facebook/react-native#38282 (comment)

I also needed to install these:
yarn add --dev @react-native/js-polyfills metro-config @react-native/metro-babel-transformer metro-runtime @react-native/metro-config

@rpatidar
Copy link

I was facing the similar issues for the expo, in my case I didn't needed the metro config so i deleted and it worked.

@Upsite-cor
Copy link

This is a bug from the latest version of React Native and the issue is caused by the react-native-svg library installed, what works for me so I installed the previous version of react-native.

Were you able to fix it other than by downgrading. I need to be on 0.73 and this problem persists.

I do too. Downgrading should not be the only option.

@Jithinkrishnapu
Copy link

Jithinkrishnapu commented Apr 29, 2024

Just do npx react-native start --reset-cache that's it . It will work fine.

@CarlosAlbertoTI
Copy link

Just do npx react-native start --reset-cache that's it . It will work fine.

This didn't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests